I have this HTML:
<div id='grid'> <input type="button" value="edit"/> <input type='button' value='update'/> </div>
How to connect a click event only for the Refresh button. I know that I could add an id class or specification to it, but both of them are not possible because they are in a gridview.
I tried this:
$("input:button[@value='update']").click(function(){alert('test');});
but displays a warning for both buttons. I know that I have to do something stupid. Any help is greatly appreciated.
Thanks to Kobe and Sarfraz for helping me. The following is the correct answer.
$("input[value='update']").click(function(){alert('test');});
source share