虫虫技术在线--技术决定出路

当前位置: 首页 > 网络 > 建站运营 > 网页设计 >

将网页设为浏览器首页或起始页或默认页

时间:2010-03-14 12:16来源:未知 作者:admin 点击:
如今,很多朋友都拥有自己的网站,有些新手想添加个设为首页的功能,下面这段代码就可以实现这个功能: html head meta http-equiv = Content-Type content = text/html;charset=gb2312 title 虫虫技术在

如今,很多朋友都拥有自己的网站,有些新手想添加个“设为首页”的功能,下面这段代码就可以实现这个功能:

  1. <html> 
  2.  
  3. <head> 
  4. <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> 
  5. <title>虫虫技术在线|www.cccto.com|---设为首页</title> 
  6. </head> 
  7.  
  8. <body>   
  9. 右击鼠标查看代码  
  10.  
  11. <p>代码一:<span onclick="var strHref=window.location.href;this.style.behavior='url(#default#homepage)';this.setHomePage('http://www.cccto.com');"  style="CURSOR: hand">设为首页</a></span></p> 
  12. <p><br> 
  13.  
  14. 代码二:<a title="设为首页" onclick="this.style.behavior='url(#default#homepage)';this.setHomePage('http://www.cccto.com');" href="javascript:;">设为首页</a> 
  15.  
  16. </p> 
  17.  
  18. </body> 
  19.  
  20. </html> 

 

(责任编辑:admin)
顶一下
(0)
0%
踩一下
(0)
0%
------分隔线----------------------------
发表评论
请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
评价:
表情:
用户名: 验证码:点击我更换图片
栏目列表
推荐内容