how to watch input buttons with specified name?
Posted
by
user393087
on Stack Overflow
See other posts from Stack Overflow
or by user393087
Published on 2011-01-09T23:44:19Z
Indexed on
2011/01/09
23:53 UTC
Read the original article
Hit count: 169
JavaScript
|javascript-events
For example I have long list of buttons: <input type=button name=clickbutton onclick='dosomething(this)'>
But instead of putting call to the same funcion in every button it would be more rational to add a single listening event that would wait for click of that button with this name. But again, there are maany this buttons so I need pass clicked object to a function. For example this function must update a textarea field that is adjacent (nextSibling) to this button.
© Stack Overflow or respective owner