Tutorial Open Link In A New Tab

Assalamualaikum ..
Terima kasih sudi singgah blog Tia dan baca entri ;)

Open link in a new tab? Apa tu? Baca penerangan penuh kat sini. Bagi Tia, ia penting. Yelah supaya bila orang klik apa-apa link yang ada dekat entri ni pun, hangpa takkan tinggalkan blog ni. Hehe! Nak cuba? Klik ini. Lepas tu patah balik mai sini noh!

Ziema ada bagitau dua cara manual untuk buat open link in a new tab kan. Tia pun ada satu. Tapi yang ni automatik. korang cuma kena add a gadget dan masukkan code di bawah.. Credit to adik zai shayammm..


<!-- 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>

Previous
Next Post »

26 Comments

Click here for Comments
myzziema
admin
June 4, 2011 at 10:46 AM ×

wahh just tambah kat gadjet then sume URL automatik akan open new tab ke?

Reply
avatar
myzziema
admin
June 4, 2011 at 10:50 AM ×

dah tambah :D thanks for tutor sis ;)

Reply
avatar
June 4, 2011 at 10:50 AM ×

tiaaa cam ne tuh.. makne nye blog ni akan meten tebuka even buka blog lain ke..??? ke camne

Reply
avatar
Unknown
admin
June 4, 2011 at 11:02 AM ×

@.m y z. : eya dear . automatik open new tab punya ;) u r most welcome ..

@k a k L a m p : ye kak . maintain blog akan terbuka even akak klik link ke URL lain . insyaAllah ;)

Reply
avatar
June 4, 2011 at 11:37 AM ×

wahhh!!!! time kasih dgn info2 tuto..weeee

Reply
avatar
Unknown
admin
June 4, 2011 at 11:38 AM ×

oh. just tambah kat gadget eh? thanks tia :D eyfa dah buat dh :p

Reply
avatar
Rina Rahamat
admin
June 4, 2011 at 11:47 AM ×

oh harus dicoba ini..tq

Reply
avatar
Rina Rahamat
admin
June 4, 2011 at 11:50 AM ×

ahkak dah buat..menjadikk..sukanya ahkak!

Reply
avatar
adan
admin
June 4, 2011 at 11:59 AM ×

macam senang je nak buatnya ni.. ^_^

Reply
avatar
Unknown
admin
June 4, 2011 at 12:00 PM ×

@Lady Ainaa : kasih diterima ;)

@EYFAalias : oke eyfa ;)

@kak Rina : hehee . okelh tu ahkak ;)

Reply
avatar
Anonymous
admin
June 4, 2011 at 1:42 PM ×

wahhhh nice tutor.
lepas nie nak buat dekat belog chemay pulakk
:)

Reply
avatar
normala_ali
admin
June 4, 2011 at 2:18 PM ×

awak2 saya ade wat entry pasal awak.. tahniah k.. :)

Reply
avatar
cik azeya
admin
June 4, 2011 at 3:37 PM ×

ouh. begitu ya. jap g nak try. ^^

Reply
avatar
fRaMe+LenSeS
admin
June 4, 2011 at 3:58 PM ×

Ai Tia , Nadh ni. ingat tak? sal cita Nadh tu.. kisah ciptaan Nadh ja.. :) maceh sanggup abehkan membaca.. :)

Reply
avatar
Pha Is
admin
June 4, 2011 at 4:59 PM ×

waa.. sangat berguna... thanks for sharing...

Reply
avatar
Arpiiz
admin
June 4, 2011 at 10:22 PM ×

ye2, thanks sebab buatkan tutor ni..^^

nanti ada masa baru buat..

Reply
avatar
Syat0za Zai
admin
June 4, 2011 at 11:04 PM ×

yeah! akak femes dah! :D

buatlah tenkiu --> adik zai shayam! :P

Reply
avatar
K
admin
June 8, 2011 at 9:12 PM ×

nape tak jadi pon???????

Reply
avatar
Abu Bagi
admin
July 5, 2011 at 10:35 PM ×

keroro buat entry ni jugak..hahahah aku mulut becok ahahaha

nice..nnti kalau rajin aku buat..hehe
btw, lama ndak nampak ko tia..nampakkah keh keh :)

Reply
avatar
Unknown
admin
July 15, 2011 at 1:55 AM ×

thank tia ...dah boleh dah..senang sikit nak BW nanti

Reply
avatar
SITAHjewl
admin
October 11, 2011 at 10:33 PM ×

thanks for the info...tadi ade jugk cari kt blog org lain...surh copy benda tu tp bila nk copy, kuar satu kotak cakap jgn copy,dose...ntah ape2 ntah blog tu..huhuhuhuhu....
love your blog....follow2....hehehhe

Reply
avatar
December 4, 2011 at 3:21 AM ×

finally it success..thanks tia..

Reply
avatar
thumbdrive
admin
December 4, 2011 at 3:22 AM ×

its really help me..thanks a lot..

Reply
avatar