Tutorial : Link In New Tab

Assalammualaikum and Annyeonghaseyo


Tutor ni bila korang tekan link, dia akan buka page baru. If masih tak faham, Sila tekan SINI. Jom mulakan tutor ye :)

1. Dashboard ---> Layout ---> Add gadget/HTML

2. Copy paste code di bawah.

<!-- 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("URL") < 0 //not links that are 'inside' blog
&& arr[i].href.indexOf("javascript:") < 0) //not javascript links
arr[i].target = "_blank";

3. Save.

Dah siap!!
Request tutor and freebies ye :3

No comments: