The button Object [2|3|I]

The button object reflects a push button from an HTML form in JavaScript.

Properties

  • enabled— A Boolean value indicating whether the button is enabled. (Not 2|3.)

  • form— A reference to the form object containing the button. (Not 2|3.)

  • name— A string value containing the name of the button element.

  • type— A string value reflecting the TYPE attribute of the <input/> element. (Not 2|I.)

  • value— A string value containing the value of the button element.

Methods

  • click()— Emulates the action of clicking the button.

  • focus()— Gives focus to the button. (Not 2|3.)

Event Handlers

  • onMouseDown— Specifies JavaScript code to execute when a user presses a mouse button.

  • onMouseUp— Specifies JavaScript code to execute when the user releases a mouse ...

Get Platinum Edition Using XHTML™, XML, and Java™ 2 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.