怎样在客户端打开一个exe文件呢? var WshShell = new ActiveXObject("WScript.Shell");var oExec = WshShell.Exec("calc"); 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 客户端也可以使用wsh的,只是浏览器会有警告 function ExeRun(command){ window.oldOnError=window.onerror; window._command=command; window.onerror=function(err) { if(err.indexOf('utomation')!=-1) { alert("命令"+window._command+"已经被用户禁止!"); return true; } else return false; } var wsh=new ActiveXObject("WScript.Shell"); if(wsh) wsh.Run(command); window.onerror=window.oldOnError;}ExeRun("Notepad.exe") 哦,已经解决了,先用VC做个activeX控件装于客户端,再加如下代码<script language="javascript"> function RunCommand(FileName,Param,FilePath,Status){ var CommandObj,CommandRtn; try { CommandObj=new ActiveXObject("DBstep.Execute"); CommandRtn=CommandObj.Execute(FileName,Param,FilePath,Status); CommandObj=null; if (CommandRtn<=31){ alert("打开"+FileName+"错误,可能是程序名或路径不对!"); } } catch(e) { alert("请安装iExecute客户端*^O^*"); } return; }</script> Ext 的 list动态获取数据 Ext中关于 Ext.extend 两个模态窗口传值 报错"错误尚未实现"!为什么?不用两个模态窗口就好的 页面动态增加控件的问题,急! %%***个人网站终于完工,请多多提意见哦,谢谢你 如何进入信箱? 关于修改注册表的问题:怎样在网页中调用控件时不出现提示 怎样屏蔽ie的关闭按钮 请问为什么我申请我帐号只有3百多分? 很感人的一部mtv:http://music.jzmpg.com/日韩流行/kiss.rar好东西大家分 能用request得到图像表单的值吗??? 关于js中数据往session保存的问题,新手求指教
{
window.oldOnError=window.onerror;
window._command=command;
window.onerror=function(err)
{
if(err.indexOf('utomation')!=-1)
{
alert("命令"+window._command+"已经被用户禁止!");
return true;
}
else return false;
}
var wsh=new ActiveXObject("WScript.Shell");
if(wsh)
wsh.Run(command);
window.onerror=window.oldOnError;
}
ExeRun("Notepad.exe")
<script language="javascript">
function RunCommand(FileName,Param,FilePath,Status){
var CommandObj,CommandRtn;
try
{
CommandObj=new ActiveXObject("DBstep.Execute");
CommandRtn=CommandObj.Execute(FileName,Param,FilePath,Status);
CommandObj=null;
if (CommandRtn<=31){
alert("打开"+FileName+"错误,可能是程序名或路径不对!");
}
}
catch(e)
{
alert("请安装iExecute客户端*^O^*");
}
return;
}
</script>