[Chapter 21] Reference: Button.onclick()
Author: David Flanagan
Date: Fri Aug 29 11:14:09 1997

#

| Chapter 21 JavaScript Reference |

# Button.onclick() Handler

## Name

Button.onclick() Handler---invoked when a Button is clicked

## Availability

Navigator 2.0, Internet Explorer 3.0

## Synopsis

    <INPUT TYPE="button" a definition of the handler
           VALUE="button-text"
           onClick="handler-statements">
    button.onclick    a reference to the handler
    button.onclick(); an explicit invocation of the handler

## Description

`onclick()` is an event handler invoked when the user clicks on a button. A button's `onclick()` handler is defined by the `onClick` attribute of the HTML `<INPUT>` tag. The value of this attribute may be any number of JavaScript statements, separated by semicolons; these statements will be executed when the user clicks on the button.

## See Also

"Button"

Button.onblur() |  | Button.onfocus()