轉自:http://liujinghao.iteye.com/blog/1452898.
1.文字型:
<a onclick="this.style.behavior=’url(#default#homepage)’;this.setHomePage(’http://www.apple-wallpaper.com’);" href="http://www.apple-wallpaper.com" target="_blank" rel="external nofollow" >設為首頁</a>
2.按鈕型:
<input TYPE="button" VALUE=" 設為首頁 " onclick="this.style.behavior=’url(#default#homepage)’;this.setHomePage(’http://www.apple-wallpaper.com’);" href="http://www.apple-wallpaper.comt" target="_blank" rel="external nofollow" target="_blank" rel="external nofollow" >
3.離開時自動提示設為首頁:
<body onunload="BASEBody.style.behavior=’url(#default#homepage)’;if(!(BASEBody.isHomePage(’http://www.1.com’)))BASEBody.setHomePage(’http://www.apple-wallpaper.comt’);">
4.打開網頁就提示是否設為首頁:
<script language="javascript">
function myhomepage(){
this.homepage.style.behavior=’url(#default#homepage)’;this.homepage.sethomepage(’http://www.dafacai.net’);
}
</script>
<p align="center"><a href="http://www.apple-wallpaper.comt" target="_blank" rel="external nofollow" target="_blank" rel="external nofollow" name="homepage"
onclick="myhomepage();"></a>
1.圖檔連結
<a style="cursor:hand" onclick="this.style.behavior='url(#default#homepage)';
this.setHomePage('http://www.apple-wallpaper.com');">
<img width=16 height=16 images/Logo.gif">
<u> 設為首頁</u></a>
2.文字型:
<a onclick="this.style.behavior='url(#default#homepage)';
this.setHomePage('http://www.apple-wallpaper.com');" href="#" target="_blank" rel="external nofollow" target="_blank" rel="external nofollow" target="_blank" rel="external nofollow" >設為首頁</a>
3.按鈕型:
<input TYPE="button" VALUE=" 設為首頁 " onclick="this.style.behavior='url(#default#homepage)';
this.setHomePage('http://www.apple-wallpaper.com');" href="#" target="_blank" rel="external nofollow" target="_blank" rel="external nofollow" target="_blank" rel="external nofollow" >
4.離開時自動提示設為首頁
<body onunload="BASEBody.style.behavior='url(#default#homepage)';
if(!(BASEBody.isHomePage('http://www.apple-wallpaper.com')))BASEBody.setHomePage('http://www.apple-wallpaper.com/');">
5.滑鼠指向時提示設為首頁
<A href="http://www.apple-wallpaper.com/" target="_blank" rel="external nofollow" onmouseover="this.style.behavior='url(#default#homepage)';
this.setHomePage('http://www.apple-wallpaper.com');" target="_blank">設為首頁</A>
-------------------------------------------------------------------------------
加入收藏代碼
1.
<a href="#" target="_blank" rel="external nofollow" target="_blank" rel="external nofollow" target="_blank" rel="external nofollow" onclick="javascript:window.external.AddFavorite('http://www.apple-wallpaper.com','蘋果桌面資源')" title="收藏本站到你的收藏夾"><font size="-1" color="#FFE09E">收藏本站</font></a>
2.
<a href="javascript:void(0);" target="_blank" rel="external nofollow" onClick="window.external.AddFavorite(document.location.href,document.title)">加入收藏</a>
加入頻道
<a href="typhoon.cdf" target="_blank" rel="external nofollow" )>加入頻道</a>
郵件連結
<a href="mailto:[email protected]" target="_blank" rel="external nofollow" >與我聯系</a>
再将下面代碼加入<body>内:
onload="myhomepage();"
即:<body onload="myhomepage();">