I made a page for complicated query, there were too many fields, so I filled it out once, and it was very troublesome to clear it
$('#myform')[0].reset();Although the reset method can be part of it, if you have an element like this
<input name="percent" value="50"/>
Then clicking reset will only restore to 50
So, with the following method, browse it online,
$(':input','#myform') .not(':button, :submit, :reset, :hidden') .val('') .removeAttr('checked') .removeAttr('selected');