August 1999
Intermediate to advanced
1488 pages
72h 53m
English
onClick="command"The onClick event handler is defined in an <input> tag and specifies what to do when the button is clicked.
The code in Listing 7.29 uses the onClick event handler to display an alert box any time the button is clicked.
<html>
<form name="myForm">
<input type="button"
value="Big Button"
name="myButton"
onClick="alert('Click event occurred')">
</form>
</html>
|
Read now
Unlock full access