Answers for "event listener button prfefss"

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
3

javascript event listener

element.addEventListener("click", function(){ 
   element.innerText = "something"; 
});
Posted by: Guest on February-19-2020

Code answers related to "event listener button prfefss"

Browse Popular Code Answers by Language