»
EnglishFrenchVietnamese

Print - Open Link - JavaScriptBank.com

Full version: jsB@nk » Link » Open Link
URL: https://www.javascriptbank.com/open-link.html

Open Link © JavaScriptBank.comAdd the option of allowing links on your page to be opened in a new window with this powerful script. A simple checkbox toggles between the current and new window. Great!

Full version: jsB@nk » Link » Open Link
URL: https://www.javascriptbank.com/open-link.html



JavaScript
<SCRIPT LANGUAGE="JavaScript">// Open Link// Jason Francis ([email protected])<!-- Beginfunction hyperlinks(target){  if (target) where = "_blank";  else where = "_self";  for (var i=0; i<=(document.links.length-1); i++)  {  document.links[i].target = where;  }}//  End --></script><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<form><input type="checkbox" name="targetnew" onclick="hyperlinks(this.checked)" value="ON"> Open links in a New Window</form><a href="http://javascriptbank.com/">Java Boutique</a><br><a href="http://javascriptbank.com/">The Counter</a><br><a href="http://javascriptbank.com/">Web Developer&#39;s Virtual Library</a><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->