Answers for "javascript onclick event add html element"

8

how to add onclick event in javascript

var element = document.getElementById("elem");
element.onclick = function(event) {
  console.log(event);
}
Posted by: Guest on May-20-2020
0

javascript onclick event add html element

<button onclick="right()"class="fas fa-arrow-alt-circle-right right" style="width:50px;height:50px;padding: 130px;"></button>
Posted by: Guest on October-28-2021

Code answers related to "javascript onclick event add html element"

Code answers related to "Javascript"

Browse Popular Code Answers by Language