reset | NN 2 IE 3 DOM 1 | ||||
The reset object is a form control generated with an INPUT element whose TYPE attribute is set to reset. This element is similar to the button object. No script action is necessary for the reset object to do its job of restoring form controls to their default settings. | |||||
HTML Equivalent<INPUT TYPE="reset"> | |||||
Object Model Reference
|
accessKey | NN n/a IE 4 DOM 1 | ||
Read/Write | |||
A single character key that "clicks" the reset button.
The browser and operating system determine whether the user must
press a modifier key (e.g., | |||
Exampledocument.entryForm.myReset.accessKey = "n" | |||
Value Single alphanumeric (and punctuation) keyboard character. | |||
|
disabled | NN n/a IE 4 DOM 1 | ||
Read/Write | |||
Whether the element is available for user interaction. When set to true, the element cannot receive focus. | |||
Exampledocument.forms[0].myReset.disabled = true | |||
Value Boolean value: true | false. | |||
|
form | NN 2 IE 3 DOM n/a | ||
Read-only | |||
Returns a reference to the FORM element that contains the current element (if any). This property is most often passed as a parameter for an event handler, using the this keyword to refer to the current form control. | |||
Example<INPUT TYPE="button" VALUE="Validate Form" onClick="doValidate(this.form)"> | |||
Value Object reference. | |||
|
name | NN 2 IE 3 DOM 1 | ||
Read/Write | |||
The identifier associated with the form control. Names are hidden from user view, since control labels are assigned via other means, depending on the control type. Form control names may also be used by script references to the objects. | |||
Exampledocument.orderForm.myReset.name = "Win32" | |||
Value Case-sensitive identifier that follows the rules of identifier naming: it may contain no whitespace, cannot begin with a numeral, and should avoid punctuation except for the underscore character. | |||
|
tabIndex | NN n/a IE 4 DOM 1 | ||
Read/Write | |||
A number that indicates the sequence of this element within the tabbing order of all focusable elements in the document. Tabbing order follows a strict set of rules. Elements that have values other than zero assigned to their tabIndex properties are first in line when a user starts tabbing in a page. Focus starts with the element with the lowest tabIndex value and proceeds in order to the highest value, regardless of physical location on the page or in the document. If two elements have the same tabIndex values, the element that comes earlier in the document receives focus first. Next come all elements that either don't support the tabIndex property or have the value set to zero. These elements receive focus in the order in which they appear in the document. A value of -1 removes the element from tabbing order altogether. Note that the Macintosh user interface does not provide for giving focus to elements other than text and password INPUT fields. | |||
Exampledocument.forms[0].myReset.tabIndex = 6 | |||
Value Integer. | |||
|
type | NN 3 IE 4 DOM 1 | ||
Read-only | |||
Returns the type of form control element. The value is returned in all lowercase letters. It may be necessary to cycle through all form elements in search of specific types to do some processing on (e.g., emptying all form controls of type "text" while leaving other controls untouched). | |||
Exampleif (document.forms[0].elements[3].type == "reset") { ... } | |||
Value Any of the following constants (as a string): button | checkbox | file | hidden | image | password | radio | reset | select-multiple | select-one | submit | text | textarea. | |||
|
value | NN 2 IE 3 DOM 1 | ||
Read/Write | |||
This is the rare time that the value property controls the label of a form control: the text that appears on the reset button. | |||
Exampledocument.forms[0].myReset.value = "Undo" | |||
Value String. | |||
|
blur( ) | NN n/a IE 4 DOM n/a |
Removes focus from the current element and fires an onBlur event (in IE). No other element necessarily receives focus as a result. | |
Returned Value None. | |
Parameters None. |
focus( ) | NN n/a IE 4 DOM n/a |
Gives focus to the current element and fires the onFocus event (in IE). If another element had focus at the time, it receives an onBlur event. | |
Returned Value None. | |
Parameters None. |
handleEvent( ) | NN 4 IE n/a DOM n/a | ||
handleEvent(event) Instructs the object to accept and process the event whose specifications are passed as the parameter to the method. The object must have an event handler for the event type to process the event. | |||
Returned Value None. | |||
Parameters
|