Does this work (presuming the form has an id of myForm)?

$('#myForm')[0].reset();


Andy Matthews wrote:
> I'm going to be submitting a form via AJAX and I'd like to be able to clear
> all of the fields afterwards. I could obviously do it by referencing each
> field manually, but I'm wondering if it's possible to do something like
> this:
> $('#myForm').clearFields();
> 
> or something to that effect. I just want to reset all fields to their
> original values. Is this possible using jQuery, without having to do each
> field individually?

_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to