Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/475.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 自动化服务器可以';在包含chrome的条件后,不要在IE8中创建对象_Javascript_Google Chrome_Internet Explorer 8_Applet_Activexobject - Fatal编程技术网

Javascript 自动化服务器可以';在包含chrome的条件后,不要在IE8中创建对象

Javascript 自动化服务器可以';在包含chrome的条件后,不要在IE8中创建对象,javascript,google-chrome,internet-explorer-8,applet,activexobject,Javascript,Google Chrome,Internet Explorer 8,Applet,Activexobject,以前我在做什么 <script> function fun1(){ var sh=new ActiveXObject("Wscript.Shell"); sh.run("\\\\ntbot\\my.exe"); } fun(); </script> 函数fun1(){ var sh=新的ActiveXObject(“Wscript.Shell”); sh.run(“\\\\ntbot\\my.exe”

以前我在做什么

    <script>
    function fun1(){
       var sh=new ActiveXObject("Wscript.Shell");
       sh.run("\\\\ntbot\\my.exe");
    }
    fun();
    </script>

函数fun1(){
var sh=新的ActiveXObject(“Wscript.Shell”);
sh.run(“\\\\ntbot\\my.exe”);
}
乐趣();
这段代码没有问题。它很高兴地从IE在客户机上执行exe,从我编写的chrome小程序中运行相同的exe,并从中运行exe。所以我所做的代码更改是

<scipt>
    function testCSS(prop) {
        return prop in document.documentElement.style;
    }
     var isChrome = !!(window.chrome && chrome.webstore && chrome.webstore.install);
     var isIE = /*@cc_on!@*/false || testCSS('msTransform'); 


        function fun2(isIE,isChrome)
        {
            if(isIE){
                var sh=new ActiveXObject("Wscript.Shell");
                sh.Run("\\\\ntbot\\my.exe");
                }if(isChrome){
                appletsource="<APPLET archive='CalciApplet.jar' codebase='/kiss' CODE='AppletGchrome.CalculateApplet.class' WIDTH='0' HEIGHT='0'></APPLET>"
                document.getElementById("appletplace").innerHTML=appletsource;
            }
        }

        fun2(isIE,isChrome);
</script>

函数testCSS(prop){
返回document.documentElement.style中的道具;
}
var isChrome=!!(window.chrome&&chrome.webstore&&chrome.webstore.install);
var isIE=/*@cc_on@*/假| | testCSS('msTransform');
功能fun2(isIE、isChrome)
{
如果(isIE){
var sh=新的ActiveXObject(“Wscript.Shell”);
sh.Run(“\\\\ntbot\\my.exe”);
}if(变色){
appletsource=“”
document.getElementById(“appletplace”).innerHTML=appletsource;
}
}
fun2(isIE,变色);
它在Chrome上不工作,但在IE中不工作。在IE中,我得到自动化服务器无法创建对象。错误

请在这方面帮助我。。多谢各位

问候,, swapnil P.

ActiveX仅限于IE它永远不会在Chrome上工作

Automation Server无法创建对象意味着activeX的安全设置设置错误。将您的页面添加到受信任的站点。

ActiveX仅适用于IE它永远不会在Chrome上工作


Automation Server无法创建对象意味着activeX的安全设置设置错误。将您的页面添加到受信任的站点。

是的,这就是为什么我在chrome上使用签名小程序。但该代码适用于linux服务器上的ie和chrome。不是在我的本地服务器上。而且我也没有更改安全设置的权限:(使其运行的唯一方法是更改设置。在锁定的机器上玩得开心。是的,这就是为什么我在chrome上使用已签名的小程序。但代码在linux服务器上适用于ie和chrome。在我的本地服务器上不适用。而且我也没有更改安全设置的权限:(好的,让它运行的唯一方法是更改设置。使用锁定的机器享受乐趣。