VBScript无法在IE 11

时间:2016-02-17 09:45:31

标签: vbscript internet-explorer-11

这是来自微软的令人震惊的消息,Internet Explorer 11不再支持VBScript。我已经尝试过在IE 11中运行vbscript的可行方法,但效果不佳。请提供解决方案/建议。

<meta http-equiv="X-UA-Compatible" content="IE=10">

我已经厌倦了这个以及js以下(将在IE 11中运行vbscript)

function callVBS(scriptName) {

  //-Variables--------------------------------------------------------
    var wsh, pathName;


  if ("ActiveXObject" in window) {
    wsh = new ActiveXObject("WScript.Shell");
    if (typeof(wsh) == 'object') {
      pathName = location.pathname.substr(0, location.pathname.lastIndexOf("/"))+"/";
      pathName = pathName.slice(1);
      wsh.run("wscript.exe \"" + pathName + scriptName + ".vbs\"", 1, true);
      wsh = null;
    }
  }
  else {
    alert("Your Browser doesn't support ActiveXObject");
  }

}

0 个答案:

没有答案