6 July 2011

Tuto : Open New Tab When Cursor Click the link


Photobucket

Comel tak kucing Kihah? 

Hye. Hari ni, Kihah nak buat tuto Open New Tab When Cursor Click the link. Paham tak? 
Tutorial ni, Bila cursor tekan link, Automatik, dia buka New Tab. :D 
So, kepada sesiapa yang blog dia tu tak boleh right click, Boleh la guna tuto ini :D

1. DAshbord > Design > Add A Gadget > HTML JavaScript
2. Copy [CTRL+C serentak] kod kat bawah ni, dan pastekan [CTRL+V serentak] di dalam ruangan HTML/JavaScript tadi tu.
<!-- 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>
3. Save. ◕‿◕ 

Ok. Sekarang, korang tekan la link-link kat blog karang tu. Theee :D Wa'alaikumussalam ◕‿◕ 

author image

FAQIHAH HUSNI

Hi! I'm the writer and author of this webpage. Currently studying in SM Sains Kubang Pasu or know as KUPSIS in Kedah. A Kedahan girl for sure! 2017 is my senior year there and I'm fighting to 9A+ in SPM. Do pray the good result for me and others 1317 warriors. Thank you for your time :)

2 comments:

Budi Bahasa Budaya Kita