五种设为首页的代码
作者:佚名 时间:2012-04-19
1.图片链接
<a style="cursor:hand" onclick="this.style.behavior='url(#default#homepage)';this.sethomepage('http://www.linksj.com');"><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.linksj.com');" href="#">设为首页</a>
3.按钮型:
<input type="button" value=" 设为首页 " onclick="this.style.behavior='url(#default#homepage)';
this.sethomepage('http://www.linksj.com');" href="#">
4.离开时自动提示设为首页
<body onunload="basebody.style.behavior='url(#default#homepage)';
if(!(basebody.ishomepage('http://www.linksj.com')))basebody.sethomepage('http://www.linksj.com/');">
5.鼠标指向时提示设为首页
<a href="http://www.apple-wallpaper.com/" onmouseover="this.style.behavior='url(#default#homepage)';
this.sethomepage('http://www.linksj.com');" target="_blank">设为首页</a>