Changes

Jump to: navigation, search

Building Forms with JavaScript

823 bytes added, 19:23, 16 May 2007
The JavaScript Button Object
== The JavaScript Button Object ==
 
Next to the Text object the JavaScript Button object is probably the second most commonly used GUI componenent when developing JavaScript forms. There are three types of Button object available. As with the Text object the Button objects use the <input> tag. The ''type='' attribute ius then used to define which type of button is to be created. The three different types are:
 
* '''type=BUTTON''' - The basic button which performs no action by default unless an event handler is assigned to it.
 
* '''type=SUBMIT''' - The submit button. When pressed this button causes the data in the Form to sent to the server using the settings defined in the <Form> tag.
 
* '''type=RESET''' - The reset button. When pressed causes the fields in the Form to be either cleared, or reset to the defaultValue (if one has been specified).

Navigation menu