/ Published in: JavaScript
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<script type="text/javascript"> //<![CDATA[ <!-- // code hack by Beben Koben function targetLinks(newWin) { if (newWin) where = "_blank"; else where = "_self"; for (var i=0; i<=(document.links.length-1); i++) { document.links[i].target = where; } } //--> //]]> </script> <p><input name="targetnewtargetnew" onclick="targetLinks(this.checked)" type="checkbox"> Links open new windows!</p>