Вопрос

Many peoples are coding as document.FORMNAME. more than document.forms.FORMNAME.

sure. it works in any browsers.

also, document.FORMNAME.FIELDNAME is most using style. not document.forms.FORMNAME.elements.FIELDNAME.

is it W3C Standard? I can't find any similar references.

anybody can explain me?

Это было полезно?

Решение

Yes it does, in the HTML5 spec, under "Supported property names" of the document and form objects.

See http://www.w3.org/html/wg/drafts/html/master/dom.html#dom-document-namedItem-which for the form names on the document onkect

and http://www.w3.org/html/wg/drafts/html/master/infrastructure.html#htmlformcontrolscollection for the field names on the form controls collection.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top