Answers for "javascript button click event by id"

10

get id of clicked element javascript

<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 March-26-2020
0

javascript click button by id

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

Code answers related to "javascript button click event by id"

Code answers related to "Javascript"

Browse Popular Code Answers by Language