Tutorial - Open Link in New Tab
okeh actually when korunk click jer button cam tuto i kann ? terus dia automatic bukak kat tab lain kann ? soo ini lah fungsi code nie yaa ? soo , jom kita mulakan yaaa ?
firstly korunk pergi ke
dashboard > design > add gadget > HTML/JavaScript
then korang paste code bwah ni dekat HTML JavaScript tau tau
<!-- 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>
korang save and siap. lepas tu tengok hasilnye yang begitu membanggakan. mwahaha :)
Thanks for reading :)
Older Post . Newer Post
Le Direct-or
Hello Earthlings! I'm human just like you~
Basics:
Name: Asma Dalila Known as: Acemaa Age: 17 years youngStat: PerakCountry: MalaysiaFav. Colours: Black, Green, and Soft PinkLanguage: Malay and EnglishHobby: Blogging, Sleeping, Eating Fav Quotes: Next to you, that's where I want to beContacts:
Facebook |
Twitter
Likes:
♥ Eating♥ Blogging♥ One D♥ Chocolates♥ Ice Cream♥ Galaxy Tabby♥ Spongebob Squarepants♥ Black+White♥ Sleeping♥ Natural Beauty
Dislikes
✖ Anons, Haters, Copypasters✖ Liars✖ Snails and all animals that dont have backbones✖ Make up✖ High heels
Tutorial - Open Link in New Tab
okeh actually when korunk click jer button cam tuto i kann ? terus dia automatic bukak kat tab lain kann ? soo ini lah fungsi code nie yaa ? soo , jom kita mulakan yaaa ?
firstly korunk pergi ke
dashboard > design > add gadget > HTML/JavaScript
then korang paste code bwah ni dekat HTML JavaScript tau tau
<!-- 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>
korang save and siap. lepas tu tengok hasilnye yang begitu membanggakan. mwahaha :)
Older Post . Newer Post