Open all links in new window

liunx

Guest
Is there a shortcut way to open all links on a pace in a new window? I dont want to do <a href=http://www.htmlforums.com/archive/index.php/"bla" target="_blank">click</a> on all the links.<!--content-->Put following the in BODY of the document after the body tag:<br />
<br />
<br />
<script language="javascript"><br />
<!--<br />
function dummy(){return}<br />
<br />
function changeLinks(){<br />
for (var i=0;i<document.links.length;i++){<br />
document.links.target = "_Blank";<br />
}<br />
loader();<br />
}<br />
<br />
var loader = (window.onload) ? window.onload : dummy;<br />
window.onload = changeLinks;<br />
//--><br />
</script><br />
<br />
<br />
The code will circle through all links on the page after the page loads and set the target attribute by script.<!--content-->Instead of popups, I would work with iframes. But that's me.<!--content-->
 
Back
Top