I am trying to select all the tags in the page and register onclick even to them.
onclick
My codes:
document.getElementsByTag
you need to assign onclick event to all the tags separately as follow:
tags
var s=document.getElementsByTagName('a'); var show = function(){ alert('hahahha'); } for (var i=0;i