<a href="javascript:if(document.all){window.external.addFavorite('http://www.baidu.com/','百da
度');}else if(window.sidebar){window.sidebar.addPanel('wode百度', 'http://gyy.scsn.gov.cn','');}">
加入收藏</a>
设置为首页的方法为:
<a href=# onClick="this.style.behavior='url(#default#homepage)'; this.setHomePage('URL');event.returnValue=false;">设为首页</a>
URL就是你要设定的网址地址
要设置当前网页的地址为首页,你可以这样:
<a href=# onClick="this.style.behavior='url(#default#homepage)'; this.setHomePage(document.location.href);event.returnValue=false;">设为 首页</a>