Answers for "button click event in js"

0

click a button using javascript

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

javascript onclick button

var button = document.querySelector('button');
button.onclick = function() {
  //do stuff
}
Posted by: Guest on March-10-2020
9

javascript click event

<button onclick="myFunction()">Click me</button>

<p id="demo"></p>

<script>
function myFunction() {
  document.getElementById("demo").innerHTML = "Hello World";
}
</script>
Posted by: Guest on April-10-2020
1

html javascript button click

<button onClick="alert('some thing to say');">click</button>
Posted by: Guest on August-24-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language