Change input value with Javascript

前端 未结 2 1412
小鲜肉
小鲜肉 2021-01-21 03:16

The title seems easy, but I need help.

I have a form with a field input \"email\" of which value is null until the user fills it up. Okay, on click of the submit button,

2条回答
  •  走了就别回头了
    2021-01-21 03:36

    Try this email.value = 'Insert a correct email'; instead of email.setAttribute('value','Insert a correct email');

提交回复
热议问题