Guys I have a button which on click post's a query which deletes values from DB. Right now when I click button it is deleting all the records from DB, but What I want is whichever ID is clicked just delete record for that ID only. I need to set up ID of a button dynamically , please look below for eg. Also suggest me there are any other alternatives to achieve this. Any help will be greatly appreciated.
//just for eg
//this is my id which im getting from DB
document.getElementsByClassName(".sui").value=$(this).attr("id"); [101,102---]
//this is my button
<button type="button" class="sukuti" >click me</button>
//myquestion is how do I set it of button to be ($(this).attr("id"))