check which button is clicked code example
Example 1: detect button click jquery
$(".btn").click(function(){
var clk = $(this).attr("id");
});
Example 2: how to check if the button is clicked or not in javascript
if(document.getElementbyId("id do item").clicked == true){
window.alert("ok")
}