Get id of Button or Clicked Button with jQuery
html Code
Document
Jquery Code
$(document).ready(function(){ $("#buttonId").click(function(){ let id = $(this).attr("id"); alert(id); }); });
html Code
Document
Jquery Code
$(document).ready(function(){ $("#buttonId").click(function(){ let id = $(this).attr("id"); alert(id); }); });
Explore more articles and keep learning
Data Science Roadmap: From Complete Beginner to Job-Ready Practitioner...
How AI Is Changing the Way Software Is Made...
8 Mistakes That Quietly Slow Down Talented Developers...
It is easy to spread hatred in the name of religion, but understanding the true message of religion is much de...