/ Published in: JavaScript
This code is very streamlined and a good in-line replacement for XHTML validation (target attribute is depreciated). When you can use the DOM to find the links with external JS (see my rel method). Works well if JavaScript is not supported and still allows for user over-ride (ie. new window or new tab).
Expand |
Embed | Plain Text
<a href="page.html" onclick="return !window.open(this.href)">
You need to login to post a comment.
