Document JavaScript Tutorial

Syntax

document.forms
    document.forms[index]
The forms property is an array that contains all the forms that exist within the HTML document from using the tag.
The forms property length contains the number of items in the array.
The index number ranges from zero to length - 1.


    
                   value="Green"
             onClick = "document.bgColor='green'">
    
    
                   value="Blue"
             onClick = "document.bgColor='blue'">