Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to create click function in javascript

var x = document.getElementById('container');
//click can also be antother event
x.addEventListener('click', function (x) {
  console.log('hi');
});
 
PREVIOUS NEXT
Tagged: #create #click #function #javascript
ADD COMMENT
Topic
Name
9+4 =