关闭网页时弹出设为主页对话框代码:
<BODY id=iehomepage  
onunload="iehomepage.style.behavior=’url(#default#homepage)’;if(!(iehomepage.isHomePage(’http://www.xqsheng.cn’)))iehomepage.setHomePage(’http://www.xqsheng.cn’);">  

打开网页弹出设为主页对话框代码:
<BODY id=iehomepage  
onload="iehomepage.style.behavior=’url(#default#homepage)’;if(!(iehomepage.isHomePage(’http://www.xqsheng.cn’)))iehomepage.setHomePage(’http://www.xqsheng.cn’);">

单击链接设为主页
<a href=# onClick="this.style.behavior=’url(#default#homepage)’;this.setHomePage(’http://www.xqsheng.cn’);">设为主页</a>

鼠标滑过设定为主页
<a href=# onMouseOver="this.style.behavior=’url(#default#homepage)’;this.setHomePage(’http://www.xqsheng.cn’);">设为主页</a>

附添加到收藏夹代码:

离开网页时弹出
<script language="javascript">
function bookmarkit(){window.external.addFavorite(’http://www.xqsheng.cn’,’Xqsheng Blog’)}</script>
<body onunload="bookmarkit()">

网页载入时弹出
<script language="javascript">
function bookmarkit(){window.external.addFavorite(’http://www.xqsheng.cn’,’Xqsheng Blog’)}/
</script>
<body onload="bookmarkit()">

右键弹出
<script language=javascript1.2>
document.all.onMouseDown=new Function("if (event.button==2||event.button==3)window.external.addFavorite(’http://www.xqsheng.cn’,’Xqsheng Blog’)")/
</script>

单击文字弹出
<script language="javascript">
function bookmarkit(){window.external.addFavorite(’http://www.xqsheng.cn’,’Xqsheng Blog’)}/
if (document.all)document.write(’<a href="#" onClick="bookmarkit()">加入收藏夹</a>’)
</script>

鼠标滑过文字弹出
<script language="javascript">
function bookmarkit(){window.external.addFavorite(’http://www.xqsheng.cn’,’Xqsheng Blog’)}/
if (document.all)document.write(’<a href="#" onMouseOver="bookmarkit()">加入收藏夹</a>’)
 

相关文章:

  • 2021-07-14
  • 2021-06-15
  • 2022-01-08
猜你喜欢
  • 2022-01-27
  • 2022-02-09
  • 2021-09-17
  • 2021-05-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案