JS脚本如下:
//收藏夹
<script language="javascript" type="text/javascript">
function addCookie()
{
var url= window.location.href;//获取当前页面URL
var name=window.document.title;//获取页面标题
if (document.all)
{
window.external.addFavorite(url,name);
}
else if (window.sidebar)
{
window.sidebar.addPanel(name, url, "");
}
}
</script>
<input id="Button1" type="button" value="添加到收藏夹" onclick="addCookie();" /><br />
<input id="Button2" type="button" value="设为主页"
onclick=" this.style.behavior='url(#default#homepage)'; this.setHomePage(window.location.href)";" /><br />