Saturday, 5 May 2012

Auto New Tab

Assalammualaikum
Smiley ^_^

Jom belajar mengenai new tab. Hah ? Apa tu ?? Hai , new tab tu kalau korang tekan
link apa-apa ke , secara automatik link yang korang buka tu ke new tab. Faham ?
Okey , jom study.

PERHATIAN !!
TUTORIALS INI ADA 2 CARA. ANDA BOLEH PILIH SATU SAHAJA
CODE NEW TAB. SEKIAN~

Cara pertama

1) Design > Edit HTML > F3 > seacrh this code

<head>

2) Copy and paste SELEPAS code yang korang jumpa.

<base target='_blank'/>
3) Save :)

Cara kedua

1) Design > Add Gadget > HTML/Javascript > copy and paste this code

<!-- 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>
2) Save.

No comments:

m
e
s
s
a
g
e
 
This blog+author+design fully edited and the designer is Nurul. Don't steal my design !