External links in a new window

The 'target' attribute is deprecated and should not be used. Here is a quick and easy way to replicate that behaviour with javascript. I got the idea - well, I guess I nicked the idea - from Kevin Yank's article on Sitepoint. My script is a little bit shorter and I've cut out the explanation.

<a rel="external" href="http://tinyurl.com/rdefj">Kevin Yank's article</a>
function external() {
var as=document.getElementsByTagName('a');
 for (i=0; i<as.length; i++) {
  if (as[i].getAttribute('rel')=='external') {
   as[i].onclick=function() {
    return false;


2022-08-28 WxevWhits says :

writing an essay outline <a href="https://essaymeshing.com/ ">essay for scholarship</a> atlas shrugged essay contest

2022-08-28 NxerBossy says :

driving essay <a href="https://essaymesa.com/ ">essay about abortion</a> best essay

Comment form

Please type the word 'forum' here:

BB code available :

  • [b]...[/b] : bold
  • [it]...[/it] : italic
  • [q]...[/q] : quote
  • [c]...[/c] : code
  • [url=...]...[/url] : url