[jQuery] Loop through all elements of a form
In order to access the underlying DOM object, you use the .get(n) method on the jQuery object.
$("#editarticle/form").get(0).elements.length;
$("#editarticle/form").get(0).reset();
Or, using jQuery, you could get all relevant form elements like so:
$("#editarticle/form :input");
And reset them like so:
$("#editarticle/form :input").val('');
m.
-----Original Message-----
From: discuss-bounces@jquery.com [mailto:discuss-bounces@jquery.com] On Behalf Of Truppe Steven
Sent: Saturday, November 11, 2006 4:57 AM
To: jQuery Discussion.
Subject: Re: [jQuery] Loop through all elements of a form
Aaron Heimlich schrieb:
> On 11/10/06, *Ⓙⓐⓚⓔ* <jakecigar@gmail.com <mailto:jakecigar@gmail.com>>
>