In development, we will use a lot of forms, we want to submit the form after the reset,
But jquery does not have this method, how to deal with it.
<form id= "Form1" action= "method=" POST "runat=" Server ">
<input name=" INP "id=" INP "value=" 1 "
/> </form>
Method One:
We can do this by just realizing
Id:
document.getElementById ("Form1"). Reset ();
Name
Document.formName.reset ();
Method Two:
Empty each:
$ ("#inp"). Val ("1");
But the form is too many words, this is also impractical, there are 100, 1000, can not write 100, 1000.
Perhaps you would say, written like this:
$ ("input"). Val ("");
The default value for the form. There are other types of forms that are written again.
Add type to reset input
<form id= "Form1" action= "method=" POST "runat=" Server ">
<input name=" INP "id=" INP "value=" 1 "/>
<input id= "res" name= "res" type= "reset" style= "Display:none;"/>
</form>
$ ("Input[name= ' res ']"). Click ();
$ ("#res"). Click ();
All Forms Empty
Ok