Automatic link target?

liunx

Guest
We all know in <a> tags, we can add target="_blank". But is there a way to automatically set links to open in a new window, by putting a separate code in the header/body? Any help would be appreciated.We all know in <a> tags, we can add target="_blank". That's not such a great way to do things. Better to use JavaScript:<script type="text/javascript">
onload = function () {
var l, i = 0
while (l = document.links[i++]) {
l.onclick = function () {
window.open (this.href, 'child')
return false
}
}
}
</script>Okay.. where do I put this? ;p

Edit : Nevermind, I got it. Thanks :D
 
Back
Top