DekGenius.com
Team LiB   Previous Section   Next Section
Button.onclick the handler invoked when a Button is clicked

Availability

JavaScript 1.0

Synopsis

<input type="button" value="button-text" onclick="handler"> 
button.onclick

Description

The onclick property of a Button object refers to an event handler function that is invoked when the user clicks on the button. See HTMLElement.onclick for complete details. Note, however, that Button.onclick has been supported since JavaScript 1.0, unlike the generalized HTMLElement.onclick handler.

See Also

HTMLElement.onclick; Chapter 19; EventListener, EventTarget, and MouseEvent in the DOM reference section

    Team LiB   Previous Section   Next Section