设为主页和收藏网址js代码
转自网络
************把其中的[url][/url]去掉
关闭网页时弹出设为主页对话框代码:
复制代码<BODYid=iehomepage
onunload="iehomepage.style.behavior='url(#default#homepage)';if(!(iehomepage.isHomePage('http://www.alioooo.com')))iehomepage.setHomePage('http://www.alioooo.com');">
打开网页弹出设为主页对话框代码:
复制代码<BODYid=iehomepage
onload="iehomepage.style.behavior='url(#default#homepage)';if(!(iehomepage.isHomePage('http://www.alioooo.com')))iehomepage.setHomePage('http://www.alioooo.com');">
单击链接设为主页
复制代码<ahref=#onClick="this.style.behavior='url(#default#homepage)';this.setHomePage('http://www.alioooo.comt');">设为主页</a>
鼠标滑过设定为主页
复制代码<ahref=#onMouseOver="this.style.behavior='url(#default#homepage)';this.setHomePage('http://www.alioooo.com');">设为主页</a>
(2)添加到收藏夹代码:
复制代码
离开网页时弹出
<scriptlanguage="javascript">
functionbookmarkit(){window.external.addFavorite('http://www.alioooo.com','网店代理')}</script>
<bodyonunload="bookmarkit()">
网页载入时弹出
复制代码<scriptlanguage="javascript">
functionbookmarkit(){window.external.addFavorite('http://www.alioooo.com','网店代理')}
</script>
<bodyonload="bookmarkit()">
右键弹出
复制代码<scriptlanguage=javascript1.2>
document.all.onMouseDown=newFunction("if(event.button==2||event.button==3)window.external.addFavorite('http://www.alioooo.com','网店代理')")
</script>
单击文字弹出
复制代码<scriptlanguage="javascript">
functionbookmarkit(){window.external.addFavorite('http://www.alioooo.com','网店代理')}
if(document.all)document.write('<ahref="#"onClick="bookmarkit()">加入收藏夹</a>')
</script>
鼠标滑过文字弹出
复制代码<scriptlanguage="javascript">
functionbookmarkit(){window.external.addFavorite('http://www.alioooo.com','网店代理')}
if(document.all)document.write('<ahref="#"onMouseOver="bookmarkit()">加入收藏夹</a>')