18 March 2011

Tutorial : open link dekat new tab

tutorial nih nak memudahkan korang , kan kalau nak bkak new tab kena click kiri dlu , tapi nih ta payah click belah kiri dah . trus tkan link . dy akan ke new tab . .

1. Dashboard > Design > Page Element > Add Gadget > HTML/JAVASCRIPT

2. copy code nih :
<!-- 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. letak dalam HTML/JAVASCRIPT

4. save

10 ✿:

Unknown said...

terima kasih tuto ni..

Charlie said...

thengs ^^

AnisFarhana said...

thanks :)

Nur Aisyah said...

saya punya blog tak dek add gadget lah akak.camna nak buat ? :'(

Sarah Nadia said...

tq sis..

Siti Zubaidah said...

Kalau gune blogskin , cmne nak buat bende nie ya ?

farahana zulkernain said...

THANKS :)

Suraya said...

thanks adik syg...

Farah Fauzi said...

mcm mne nk open new tab for certain html..contonye, farah just nk open new tab bile click banner blogger laen kat bhgian stalk them tuu..
ni url blog farah

http://rajafarah94.blogspot.com/

ATIE said...

singgah cri tutorial.. ;)