February 17, 2012

Open New Tab | Tuto



Assalammualaikum dan Salam Sejahtera Semua,

Open link new tab ini, memudahkan orang yang datang ke blog anda dan tekan link blog yang anda buat dalam entri.


1- Dashboard > ADD A GADGET >  Edit HTML/Javascript


2- Copy code bawah ini dan paste dalam Edit HTML/Javascript


<!-- code for turning all non-blog links to new page links -->
<script type="text/javascript" language="javascript">
var arr = document.getElementsByTagName("a"); //get all links in the page
for(var i = 0; i < arr.length; i++)
{
if(arr[i].href.indexOf("URL") < 0 //not links that are 'inside' blog
&& arr[i].href.indexOf("javascript:") < 0) //not javascript links
arr[i].target = "_blank";
}
</script>

3- Save

No comments: