五种设为首页的代码
时间:2012-4-19
1.图片链接
<a style="cursor:hand" onclick="this.style.behavior='url(#default#homepage)';this.setHomePage('http://www.lifacai.cn');"><img width=16 height=16 border=0 src="images/Logo.gif"><u> 设为首页</u></a>
2.文字型:
<a onclick="this.style.behavior='url(#default#homepage)';this.setHomePage('http://www.lifacai.cn');" href="#">设为首页</a>
3.按钮型:
<input TYPE="button" VALUE=" 设为首页 " onclick="this.style.behavior='url(#default#homepage)';
this.setHomePage('http://www.lifacai.cn');" href="#">
4.离开时自动提示设为首页
<body onunload="BASEBody.style.behavior='url(#default#homepage)';
if(!(BASEBody.isHomePage('http://www.lifacai.cn')))BASEBody.setHomePage('http://www.lifacai.cn/');">
5.鼠标指向时提示设为首页
<A href="http://www.apple-wallpaper.com/" onmouseover="this.style.behavior='url(#default#homepage)';
this.setHomePage('http://www.lifacai.cn');" target="_blank">设为首页</A>