Button

JavaScript 1.0+, JScript 1.0+ Nav2+, IE 3+, Opera3+ Syntax

Core client-side JavaScript object.

Description

The Button object represents a graphical button that the user can click to initiate an action. Buttons are created as part of a form by using the <input> tag with the TYPE attribute set to button in an HTML document. Once created, buttons can be accessed in JavaScript as an element of a form using dot notation. The arguments, properties, methods, and event handlers for the Button object are listed in Table 7.5.

Table 7.5. Arguments, Properties, Methods, and Event Handlers Associated with the Button Object
Type Item Description
Arguments string The string to appear in the graphical representation of a button.
  num An index ...

Get Pure JavaScript now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.