Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

onclick on non button

var ele = document.getElementById('x');
if(typeof ele.click == 'function') {
  ele.click()
} else if(typeof ele.onclick == 'function') {
  ele.onclick()
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #onclick #button
ADD COMMENT
Topic
Name
1+6 =