Tutorial Open Link in a New Window

by in , 0

HTML attribute (valid in HTML5 now):

<a href="http://chriscoyier.net" target="_blank">This link will open in new window/tab</a>

Inline JavaScript way:

<a href="http://chriscoyier.net"  onkeypress="window.open(this.href); return false;">This link will open in new window/tab</a>

With jQuery:

See here

Leave a Reply