Answers for "how to get button click event id using javascript"

0

javascript click button by id

var button = document.getElementById("button");
button.click();
Posted by: Guest on May-20-2020
1

how to get on click id in event

<button id="1" onClick="reply_click(this.id)">B1</button>
<button id="2" onClick="reply_click(this.id)">B2</button>
<button id="3" onClick="reply_click(this.id)">B3</button>
    
<script type="text/javascript">
  function reply_click(clicked_id)
  {
      alert(clicked_id);
  }
</script>
Posted by: Guest on January-07-2021

Code answers related to "how to get button click event id using javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language