I have one HTML button like,
<input type="button" id="btnSubmit" name="btnName" class="btnclass" value="Click Me" />
I want to call jQuery button click event based on id property means,
we use the code like,
$("#btnSubmit").click(function(){
////////
});
as well as call button click event based on class property means,
we use the code like,
$(".btnclass").click(function(){
/////////
});
and my question is, I want to call the button click event based on name property means, How to do this?
You can use the name property for that particular element. For example to set a border of 2px around an input element with name
xyz, you can use;DEMO