var links = document.body.getElementsByTagName('a'); for (var i=0, l=links.length; i<l; i++) { links[i].setAttribute('href', '#'); }
document.onclick = function (event) { if ( ((event = event || window.event).target || event.srcElement).tagName.toUpperCase() == "A" ) return false; };