Forms and Form Elements
There are several new features of the Form object and of the form elements that it contains in Navigator 3.0:
- The Form object now supports a
reset()method that resets the value of all elements within the form. - The Form object also supports a corresponding
onreset()method, invoked when the form is reset by the user. - All form elements now have a
typeproperty that specifies what type of element they are. - The
onclick()event handler of all form elements that support it is now cancelable--the event handler may returnfalseto indicate that the Browser should not execute the default action for that button. This affects the Reset and Submit elements. - The options displayed within a Select element can now be dynamically updated by JavaScript programs. The
options[]array of the Select element and itslengthproperty have special behavior that manipulates the displayed options, and the newOption()constructor allows the creation of new Option object for display within the Select element.