加入收藏夹,设为首页代码
把以下代码加入<Body>相应位置:
<a target=_top href="javascript:window.external.addFavorite('http://it.alipea.com','阿里it学院,IT资源分享站');">加入收藏</a>
<a href='#' onClick="this.style.behavior='url(#default#homepage)';this.setHomePage('http://it.alipea.com');">设为首页</a>
鼠标指向时提示设为首页
将下列代码插入<body>区中:
<A href=http://it.alipea.com onmouseover="this.style.behavior='url(#default#homepage)';this.setHomePage('http://it.alipea.com');" target="_blank">设为首页</A>
打开页面时自动弹出窗口询问是否设为首页
将以下代码放在<head></head>之间:
<script language="javascript">
function myhomepage(){
this.homepage.style.behavior='url(#default#homepage)';this.homepage.sethomepage('http://it.alipea.com');
}
</script>
<p align="center"><a href=http://it.alipea.com name="homepage"
onclick="myhomepage();"></a>
再将下面代码加入<body>内:
onload="myhomepage();"
即:<body onload="myhomepage();">
离开时自动提示设为首页
替换<body>标签为:
<body onunload="BASEBody.style.behavior='url(#default#homepage)';if(!(BASEBody.isHomePage('http://it.alipea.com')))BASEBody.setHomePage('http://it.alipea.com/');">
把以下代码加入<Body>相应位置:
<a target=_top href="javascript:window.external.addFavorite('http://it.alipea.com','阿里it学院,IT资源分享站');">加入收藏</a>
<a href='#' onClick="this.style.behavior='url(#default#homepage)';this.setHomePage('http://it.alipea.com');">设为首页</a>
鼠标指向时提示设为首页
将下列代码插入<body>区中:
<A href=http://it.alipea.com onmouseover="this.style.behavior='url(#default#homepage)';this.setHomePage('http://it.alipea.com');" target="_blank">设为首页</A>
打开页面时自动弹出窗口询问是否设为首页
将以下代码放在<head></head>之间:
<script language="javascript">
function myhomepage(){
this.homepage.style.behavior='url(#default#homepage)';this.homepage.sethomepage('http://it.alipea.com');
}
</script>
<p align="center"><a href=http://it.alipea.com name="homepage"
onclick="myhomepage();"></a>
再将下面代码加入<body>内:
onload="myhomepage();"
即:<body onload="myhomepage();">
离开时自动提示设为首页
替换<body>标签为:
<body onunload="BASEBody.style.behavior='url(#default#homepage)';if(!(BASEBody.isHomePage('http://it.alipea.com')))BASEBody.setHomePage('http://it.alipea.com/');">