您当前的位置: 首页 > 前端教程 > HTML教程 > 设为主页,加为收藏夹代码大全

设为主页,加为收藏夹代码大全

作者:guanchaofeng 来源:不详 发布时间: 2007-11-03 12:47 点击:
a href='#' onclick='window.external.AddFavorite("http://dotnet.aspx.cc/","远航网络www.yhwl123.cn")' 加入收藏/a a href='#' onclick="window.external.ShowBrowserUI('OrganizeFavorites', null)"整理收藏/a link rel="ShortcutIcon" href="favicon.ic

设为主页,加为收藏夹代码大全

<a href='#' onclick='window.external.AddFavorite("http://dotnet.aspx.cc/","远航网络www.yhwl123.cn")'>
加入收藏</a> <a href='#' onclick="window.external.ShowBrowserUI('OrganizeFavorites', null)">整理收藏</a>
<link rel="ShortcutIcon" href="favicon.ico">
<a href="http://www.yhwl123.cn" onClick="this.style.behavior='url(#default#homepage)';this.setHomePage('http://www.yhwl123.cn')">设远航网络为首页</a>

-------------------------------------------------------
(1)设为主页代码:

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

('http://www.yhwl123.cn');">

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

('http://www.yhwl123.cn');">

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

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

(2)添加到收藏夹代码:

离开网页时弹出
<script language="javascript">...
function bookmarkit()...{window.external.addFavorite('http://www.yhwl123.cn','个人网站')}</script>
<body onunload="bookmarkit()">

网页载入时弹出
<script language="javascript">...
function bookmarkit()...{window.external.addFavorite('http://www.yhwl123.cn','个人网站')}
</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.yhwl123.cn','个人网站')")
</script>

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

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

---------------------------------------------------------

<HTML>
    <HEAD>
      <title>添加到收藏夹和设置首页代码大全</title>
      <meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
      <meta name="CODE_LANGUAGE" Content="C#">
      <meta name="vs_defaultClientScript" content="JavaScript">
      <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
      <script language="javascript">
      <!--
          //添加到收藏夹代码---------------------------------------------
          function bookmarkit()
          ...{
            window.external.addFavorite('http://www.yhwl123.cn','远航网络')
          }
          //1.离开网页时弹出
          //<body onunload="bookmarkit()">
         
          //2.网页载入时弹出
          //<body onload="bookmarkit()">
         
          //3.右键弹出         
          document.all.onMouseDown=new Function("if (event.button==2||event.button==3)window.external.addFavorite('http://www.yhwl123.cn','小山的博客

园')")
         
          //4.单击文字弹出
          //5.鼠标滑过文字弹出
          //----------------------------------------------------
         
          //设为主页代码---------------------------         
          //1.关闭网页时弹出设为主页对话框代码
          //<BODY id=iehomepage onunload="iehomepage.style.behavior='url(#default#homepage)';if(!(iehomepage.isHomePage('http://www.yhwl123.cn')))

iehomepage.setHomePage('http://www.yhwl123.cn');">

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

iehomepage.setHomePage('http://www.yhwl123.cn');">
         
          //3.单击链接设为主页
          //4.鼠标滑过设定为主页
         
      //-->
      </script>
    </HEAD>
    <body id="iehomepage" MS_POSITIONING="GridLayout">
      <form id="Form1" method="post" runat="server">
          <a href="#" onclick="bookmarkit()">加入收藏夹</a><br>
          <br>
          <br>
          <br>
          <a href="#" onmousemove="bookmarkit()">鼠标滑过文字弹出收藏夹</a>
          <br>
          <br>
          <br>
          <br>
          <a href="#" onclick="this.style.behavior='url(#default#homepage)';this.setHomePage('http://www.yhwl123.cn');">
            单击链接设为主页</a>
          <br>
          <br>
          <br>
          <br>
          <a href="#" onmousemove="this.style.behavior='url(#default#homepage)';this.setHomePage('http://www.yhwl123.cn');">
            鼠标滑过设定为主页</a>
      </form>
    </body>
</HTML>

分享到:
本文"设为主页,加为收藏夹代码大全"由远航站长收集整理而来,仅供大家学习与参考使用。更多网站制作教程尽在远航站长站。
顶一下
(1)
100%
踩一下
(0)
0%
[点击 次] [返回上一页] [打印]
发表评论
请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
评价:
表情:
用户名: 密码: 验证码:
关于本站 - 联系我们 - 网站声明 - 友情连接- 网站地图 - 站点地图 - 返回顶部
Copyright © 2007-2013 www.yhzhan.com(远航站长). All Rights Reserved .
远航站长:为中小站长提供最佳的学习与交流平台,提供网页制作与网站编程等各类网站制作教程.
官方QQ:445490277 网站群:26680406 网站备案号:豫ICP备07500620号-4