Javascript Reference
Categories: FORM

javascript FORM Description

@May 17, 2009, 4:43 a.m.
form Firefox/Netscape/NN 2 IE 3 Chrome/Safari/DOM 1  

 

  

The form object reflects the form element. The form object can be referenced in all scriptable browsers via the value assigned to its tag name attribute or by the index of the forms array contained by every document. For browsers that support the id attribute (IE 4 and later and Netscape 6), you may also use the element object reference formats that employ the element's ID. To assemble a reference to a nested form control object (such as input and textarea element objects), you have a choice again of using backward compatible references that include the form object as part of the reference (as in document.formName.controlName); or in more modern browsers, you can reference the control element directly via its unique ID.

 
HTML Equivalent
 
<form>
 
Object Model Reference
 
[window.]document.formName [window.]document.forms[i] [window.]document.form["formName"] [window.]document.getElementById("elementID")
 
Object-Specific Properties
 
acceptCharset action elements[ ] encoding enctype
length method name target  
 
Object-Specific Methods
 
handleEvent[ ] reset( ) submit( )
 
Object-Specific Event Handler Properties
 
Events IE Windows IE Mac Firefox/Netscape/NN W3C DOM
onreset 3 3.01 3 2
onsubmit 3 3.01 3 2

Powered by Linode.