Yes we can solve above issue using both java script as well as jquery:
Javascript:
var aLinks=document.getElementsByTagName('a'); // returns array of all <a> link objects
//Function to be bind with link object
var show = function(){
alert("Now Show function has been binded...hahahhaha..!");
}
//Now we have to bind click event with each link object.
for(var i=0;i<aLink.length;i++){
aLinks[i].onclick=show;
}
Another Alternate way to bind all link tags with any event is to use jQuery and It provides easiest way for this kind of binding troubles.
But for that first of all we have to include jquery.js javascript file (better to use latest version).
jQuery:
$(function(){
$("a").click(function(e){
alert("Now Show function has been binded...hahahhaha..!");
});
});