15 个解决方案
#1
顶也有分!
#2
不知道,帮你顶下,分无所谓
#3
一般受信任站点不会禁止客户端OCX的应用的,所以,只需要在HTML中加入<OBJECT ...> 然后用脚本来看这个OBJECT是否成功调用了就可以知道是否被加入信任站点了!
#4
或者在客户端调用WScript.Shell检查注册表,查看是否加为信任站点,可惜这种办法往往不行,因为WScript.Shell组件一般都会被浏览器所禁止的
#5
楼上的能不能就第一种方法提供一点简单代码?
#6
<SCRIPT LANGUAGE="JavaScript">
<!--
var WshShell=new ActiveXObject("WScript.Shell");
WshShell.RegWrite("HKCU\\Software\\Microsoft\\Windows\\CurrentVe
rsion\\Internet Settings\\ZoneMap\\Domains\\21hb.com","");
WshShell.RegWrite("HKCU\\Software\\Microsoft\\Windows\\CurrentVe
rsion\\Internet Settings\\ZoneMap\\Domains\\21hb.com\\www","");
WshShell.RegWrite("HKCU\\Software\\Microsoft\\Windows\\CurrentVe
rsion\\Internet
Settings\\ZoneMap\\Domains\\21hb.com\\www\\http","2","REG_DWORD"
);
alert("写入成功");
//-->
</SCRIPT>
<!--
var WshShell=new ActiveXObject("WScript.Shell");
WshShell.RegWrite("HKCU\\Software\\Microsoft\\Windows\\CurrentVe
rsion\\Internet Settings\\ZoneMap\\Domains\\21hb.com","");
WshShell.RegWrite("HKCU\\Software\\Microsoft\\Windows\\CurrentVe
rsion\\Internet Settings\\ZoneMap\\Domains\\21hb.com\\www","");
WshShell.RegWrite("HKCU\\Software\\Microsoft\\Windows\\CurrentVe
rsion\\Internet
Settings\\ZoneMap\\Domains\\21hb.com\\www\\http","2","REG_DWORD"
);
alert("写入成功");
//-->
</SCRIPT>
#7
自己试了一下,大家看看,不知道行不行?
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>
<body>
<script language="JavaScript">
function Sumthing(num1) {
this.alpha = num1;
}
obj = new Sumthing(1);
if (obj.alpha == 1){
alert("alpha is " + obj.alpha);
}
</script>
</body>
</html>
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>
<body>
<script language="JavaScript">
function Sumthing(num1) {
this.alpha = num1;
}
obj = new Sumthing(1);
if (obj.alpha == 1){
alert("alpha is " + obj.alpha);
}
</script>
</body>
</html>
#8
从安全性上考虑,是不可以的
#9
那该如何做?请老大指点
另外js如何判断创建对象是否成功?
另外js如何判断创建对象是否成功?
#10
自己顶
#11
恩,顶一下
#12
问题没有解决,今天最后一天了!请会的看看!
#13
在WIN2000下,修改注册表即可,只需将127.0.0.1改成你的网站就行了
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range1]
"https"=dword:00000002
":Range"="127.0.0.1"
"http"=dword:00000002
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range1]
"https"=dword:00000002
":Range"="127.0.0.1"
"http"=dword:00000002
#14
<script>
function _exec (command) {
window.oldOnError = window.onerror;
window._command = command;
window.onerror = function (err) {
if (err.indexOf('utomation') != -1) {
//alert('未设置成信息站点!');
window.location.href="提示页面.htm" //转到提示页面
//return true;
}
else
{
window.location.href="站点首页.htm" //转到站点首页
}
};
var wsh = new ActiveXObject('WScript.Shell');
if (wsh)
wsh.Run(command);
window.onerror = window.oldOnError;
}
_exec("mspaint.exe")
</script>
function _exec (command) {
window.oldOnError = window.onerror;
window._command = command;
window.onerror = function (err) {
if (err.indexOf('utomation') != -1) {
//alert('未设置成信息站点!');
window.location.href="提示页面.htm" //转到提示页面
//return true;
}
else
{
window.location.href="站点首页.htm" //转到站点首页
}
};
var wsh = new ActiveXObject('WScript.Shell');
if (wsh)
wsh.Run(command);
window.onerror = window.oldOnError;
}
_exec("mspaint.exe")
</script>
#15
用这段代码,这段代码判断能否执行EXE,如果不行,说明未设置成信任站点,跳到“提示页面”,如果成功,则表示已设置成信任站点,转到站点首页
#1
顶也有分!
#2
不知道,帮你顶下,分无所谓
#3
一般受信任站点不会禁止客户端OCX的应用的,所以,只需要在HTML中加入<OBJECT ...> 然后用脚本来看这个OBJECT是否成功调用了就可以知道是否被加入信任站点了!
#4
或者在客户端调用WScript.Shell检查注册表,查看是否加为信任站点,可惜这种办法往往不行,因为WScript.Shell组件一般都会被浏览器所禁止的
#5
楼上的能不能就第一种方法提供一点简单代码?
#6
<SCRIPT LANGUAGE="JavaScript">
<!--
var WshShell=new ActiveXObject("WScript.Shell");
WshShell.RegWrite("HKCU\\Software\\Microsoft\\Windows\\CurrentVe
rsion\\Internet Settings\\ZoneMap\\Domains\\21hb.com","");
WshShell.RegWrite("HKCU\\Software\\Microsoft\\Windows\\CurrentVe
rsion\\Internet Settings\\ZoneMap\\Domains\\21hb.com\\www","");
WshShell.RegWrite("HKCU\\Software\\Microsoft\\Windows\\CurrentVe
rsion\\Internet
Settings\\ZoneMap\\Domains\\21hb.com\\www\\http","2","REG_DWORD"
);
alert("写入成功");
//-->
</SCRIPT>
<!--
var WshShell=new ActiveXObject("WScript.Shell");
WshShell.RegWrite("HKCU\\Software\\Microsoft\\Windows\\CurrentVe
rsion\\Internet Settings\\ZoneMap\\Domains\\21hb.com","");
WshShell.RegWrite("HKCU\\Software\\Microsoft\\Windows\\CurrentVe
rsion\\Internet Settings\\ZoneMap\\Domains\\21hb.com\\www","");
WshShell.RegWrite("HKCU\\Software\\Microsoft\\Windows\\CurrentVe
rsion\\Internet
Settings\\ZoneMap\\Domains\\21hb.com\\www\\http","2","REG_DWORD"
);
alert("写入成功");
//-->
</SCRIPT>
#7
自己试了一下,大家看看,不知道行不行?
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>
<body>
<script language="JavaScript">
function Sumthing(num1) {
this.alpha = num1;
}
obj = new Sumthing(1);
if (obj.alpha == 1){
alert("alpha is " + obj.alpha);
}
</script>
</body>
</html>
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>
<body>
<script language="JavaScript">
function Sumthing(num1) {
this.alpha = num1;
}
obj = new Sumthing(1);
if (obj.alpha == 1){
alert("alpha is " + obj.alpha);
}
</script>
</body>
</html>
#8
从安全性上考虑,是不可以的
#9
那该如何做?请老大指点
另外js如何判断创建对象是否成功?
另外js如何判断创建对象是否成功?
#10
自己顶
#11
恩,顶一下
#12
问题没有解决,今天最后一天了!请会的看看!
#13
在WIN2000下,修改注册表即可,只需将127.0.0.1改成你的网站就行了
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range1]
"https"=dword:00000002
":Range"="127.0.0.1"
"http"=dword:00000002
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range1]
"https"=dword:00000002
":Range"="127.0.0.1"
"http"=dword:00000002
#14
<script>
function _exec (command) {
window.oldOnError = window.onerror;
window._command = command;
window.onerror = function (err) {
if (err.indexOf('utomation') != -1) {
//alert('未设置成信息站点!');
window.location.href="提示页面.htm" //转到提示页面
//return true;
}
else
{
window.location.href="站点首页.htm" //转到站点首页
}
};
var wsh = new ActiveXObject('WScript.Shell');
if (wsh)
wsh.Run(command);
window.onerror = window.oldOnError;
}
_exec("mspaint.exe")
</script>
function _exec (command) {
window.oldOnError = window.onerror;
window._command = command;
window.onerror = function (err) {
if (err.indexOf('utomation') != -1) {
//alert('未设置成信息站点!');
window.location.href="提示页面.htm" //转到提示页面
//return true;
}
else
{
window.location.href="站点首页.htm" //转到站点首页
}
};
var wsh = new ActiveXObject('WScript.Shell');
if (wsh)
wsh.Run(command);
window.onerror = window.oldOnError;
}
_exec("mspaint.exe")
</script>
#15
用这段代码,这段代码判断能否执行EXE,如果不行,说明未设置成信任站点,跳到“提示页面”,如果成功,则表示已设置成信任站点,转到站点首页