| Author |
howto detect which button is click
|
Alvin chew
Ranch Hand
Joined: Jan 08, 2004
Posts: 834
|
|
hi , good day ..let assume i have ten buttons as follow, how can i know which button was pressed ? thank you
|
 |
Eric Pascarello
author
Rancher
Joined: Nov 08, 2001
Posts: 15357
|
|
|
Add an onclick handler?
|
 |
Alvin chew
Ranch Hand
Joined: Jan 08, 2004
Posts: 834
|
|
|
eric, i want when user click the button , then we can get the button name which have been clicked
|
 |
Eric Pascarello
author
Rancher
Joined: Nov 08, 2001
Posts: 15357
|
|
The easiest approach is adding an onclick handler that stores the value in a variable. The other approach is the following, I am not sure if it is crossbrowser friendly, have not tried it. Eric
|
 |
Alvin chew
Ranch Hand
Joined: Jan 08, 2004
Posts: 834
|
|
thanks , eric
|
 |
 |
|
|
subject: howto detect which button is click
|
|
|