教学'点击链接'在new tab开启
07 November 2011 @ 11:28 PM
[ 转帖请告知'并附上本部落格链接和主人名字 ]
跟着以下步骤做吧 :D
1 Design - Edit Layout - Add a Gadget - Html/Javascript
2 把以下代码放进去 :
<!-- 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";
}
</script>
4 最后按 save 就可以了噢 :]
[ 完 peace out ]