04 October 2011

Tutorial | Link Auto-Open New Tab |



Bila korang tekan link, automatik akan buka new tab. So tuto dia ada kat bawah


1) Copy kod di bawah ini 
<!-- 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("Your URL") < 0 //not links that are 'inside' blog
&& arr[i].href.indexOf("javascript:") < 0) //not javascript links
arr[i].target = "_blank";
}
</script>
2) Paste pada ruangan HTML/ Javascript 

3) Siap boleh save 

Terima kasih sudi baca. Like kalau suka

1 suka ayam goreng:

ainwaheeda said...

suke... suke.. sukeee^^

>
 
copyright by > Cikelyana