window.onload = function() { n=0; while (document.getElementsByTagName('a')[n]){ document.getElementsByTagName('a')[n].onclick = function(){alert(); return false;}; n++; } }
alert();