get id of button jquery code example
Example 1: how to get the id of button clicked in jquery
$("button").click(function() {
alert(this.id); // or alert($(this).attr('id'));
});
Example 2: jquery get id value
var myId = $(this).attr('id');
alert( myId );