Answers for "clickevent js"

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
0

does click event work only for buttons

button > * {
  pointer-events: none;
}
Posted by: Guest on December-08-2020

Browse Popular Code Answers by Language