Merge pull request #2496 from knoxj1/master

Add comments to article.md
This commit is contained in:
Ilya Kantor 2021-03-13 01:23:58 +03:00 committed by GitHub
commit 20fd4f8a70
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -11,8 +11,8 @@ Document forms are members of the special collection `document.forms`.
That's a so-called "named collection": it's both named and ordered. We can use both the name or the number in the document to get the form. That's a so-called "named collection": it's both named and ordered. We can use both the name or the number in the document to get the form.
```js no-beautify ```js no-beautify
document.forms.my - the form with name="my" document.forms.my; // the form with name="my"
document.forms[0] - the first form in the document document.forms[0]; // the first form in the document
``` ```
When we have a form, then any element is available in the named collection `form.elements`. When we have a form, then any element is available in the named collection `form.elements`.