forms
Summary
This property returns an object array representing an HTMLCollection of all the forms in the document.
Property of dom/Documentdom/Document
Syntax
Note: This property is read-only.
var HTMLCollection = document.forms;
Return Value
Returns an object of type DOM NodeDOM Node
Returns a collection of all the forms of a document
Examples
//retrieve forms collection and report how many forms are in the document
function numForms() {
var allForms = document.forms;
alert(allForms.length);
}
Related specifications
- DOM Level 2 HTML
- Recommendation
Attributions
Microsoft Developer Network: [Windows Internet Explorer API reference Article]