Ⓙⓐⓚⓔ schrieb:
> in the old html. before the xhtml reformation, we referred to forms by
> names or numbers,
>
> in jq, while keeping with the old teachings, I would say
>
> $('[EMAIL PROTECTED]')[0].reset();
>
> But I'd still code
>
> document.forms.myform.reset();
>
> because there is no magic involved. If I wanted some chainable magic
>
> $('[EMAIL PROTECTED]').each( function (){this.reset();}) ...
>
> and carry on with this unlikely chain.
In XHTML, the name attribute for the form element is deprecated.
http://www.w3.org/TR/xhtml1/#C_8
It is not recommended to use it in HTML either:
"This attribute has been included for backwards compatibility.
Applications should use the id attribute to identify elements."
http://www.w3.org/TR/html4/interact/forms.html#h-17.3
I pretty much assume that using an id is also faster.
$('#myformid') ...
-- Klaus
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/