I have a form with a standard reset button coded thusly:
Trouble i
From http://groups.google.com/group/jquery-dev/msg/2e0b7435a864beea:
$('#myform')[0].reset();
setting myinput.val('')
might not emulate "reset" 100% if you have an input like this:
Eg calling myinput.val('')
on an input with a default value of 50 would set it to an empty string, whereas calling myform.reset()
would reset it to its initial value of 50.