25.28. The Reset Object

The Reset object corresponds to buttons created through <INPUT TYPE="RESET" ...> in an HTML form. Reset objects are normally accessed through the elements array of the enclosing Form object. If both the button and the form are named, they can also be accessed through document.formName.resetButtonName.

Properties

form This property gives the Form object containing the button. It is read-only.

name If the button used the NAME attribute, this property retrieves it. The property is read-only.

type This property is always equal to reset. All Element objects contain this property, so it can be used to distinguish among the various types. It is read-only.

value This property gives the label of the button. It is read/write.

Methods ...

Get Core Web Programming, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.