Skip to content Skip to sidebar Skip to footer

Jquery How To Get Html Table Id Above Button After Clicked

I have an html table followed by a button that says 'Add Row' below it. When I click on the button, I would like to add a new row onto the html table but first I need to get the

Solution 1:

$("button").click(function(){
  var tblID = $(this).prev("table:first").attr("id");
});

Post a Comment for "Jquery How To Get Html Table Id Above Button After Clicked"