Answers for "how to get the value of clicked element in jquery"

0

how to get value of button that click on it jquery

$("button").click(function() {
    var button = $(this).val();
    alert(button);
});
Posted by: Guest on December-29-2020
3

jquery on click get element

$(document).on("click",".appDetails", function () {
   var clickedBtnID = $(this).attr('id'); // or var clickedBtnID = this.id
   alert('you clicked on button #' + clickedBtnID);
});
Posted by: Guest on September-07-2020

Code answers related to "how to get the value of clicked element in jquery"

Code answers related to "Javascript"

Browse Popular Code Answers by Language