How do find the id of the button which is being clicked?
If you don't want to pass any arguments to the onclick function, just use event.target to get the clicked element:
event.target
function reply_click() { // event.target is the element that is clicked (button in this case). console.log(event.target.id); }