August 1999
Intermediate to advanced
1488 pages
72h 53m
English
document.form.button.name
The name property provides access to the NAME attribute of the button as specified by the <input> tag. This property is a read-only string.
In Listing 7.27, a button is created. When the button is clicked, the button's name property is displayed.
<html> <form name="myForm"> <input type="button" value="Big Button" name="myButton" onClick="displayMessage()"> </form> <script language="JavaScript"> <!-- Hide //This function displays an alert box the contains the name of the button. function displayMessage() { //Create a string with name of button var alertString ... |
Read now
Unlock full access