Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/84.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从IE8打开新的IE11窗口_Javascript_Html_Shell_Internet Explorer_Browser - Fatal编程技术网

如何使用javascript从IE8打开新的IE11窗口

如何使用javascript从IE8打开新的IE11窗口,javascript,html,shell,internet-explorer,browser,Javascript,Html,Shell,Internet Explorer,Browser,我可以从IE8中打开一个新的Chrome、Safari和Firefox窗口,但我找不到如何打开IE11。当然,我知道如何从IE8打开新的IE8窗口,以及如何从IE11打开新的IE11。无论如何,我想从8打开11 我在下面添加了用于从IE8打开Chrome/Safari/Firefox的代码,以及用于打开IE11的尝试性类似操作 所以我的直接问题可能是如何使用shell.run或javascript中的任何其他方法从InternetExplorer8打开一个新的InternetExplorer11

我可以从IE8中打开一个新的Chrome、Safari和Firefox窗口,但我找不到如何打开IE11。当然,我知道如何从IE8打开新的IE8窗口,以及如何从IE11打开新的IE11。无论如何,我想从8打开11

我在下面添加了用于从IE8打开Chrome/Safari/Firefox的代码,以及用于打开IE11的尝试性类似操作

所以我的直接问题可能是如何使用shell.run或javascript中的任何其他方法从InternetExplorer8打开一个新的InternetExplorer11窗口

在说这是一个重复的问题之前,请先读一读你心目中的问题,看它是否真的有一个被接受的答案,并注意我已经成功地完成了从IE8到其他非微软浏览器的测试。另外,不要提供使应用程序与所有浏览器匹配的建议,因为这超出了这个问题的范围,也不要告诉我添加任何插件来更改客户端计算机中的任何配置,例如一些寄存器变量或其他取决于我更改客户端配置的解决方法

好吧,也许告诉我这是不可能的,也许这是我问题的最终答案。我读到很少有人回答“我可以打开一个不同的浏览器吗…”这是不可能的,但请注意,我能够在至少3个不同的浏览器上成功地做到这一点

下面的代码是基于


在不同浏览器中打开窗口
函数openFirefoxURL()
{
var shell=新的ActiveXObject(“WScript.shell”);
shell.run(“Firefoxhttps://www.google.com/#safe=strict&q=brazil");
}
函数openSafariURL()
{
var shell=新的ActiveXObject(“WScript.shell”);
shell.run(“Safarihttps://www.google.com/#safe=strict&q=brazil");
}
函数openChromeURL()
{
var shell=新的ActiveXObject(“WScript.shell”);
shell.run(“Chromehttps://www.google.com/#safe=strict&q=brazil");
}
函数openIE11URL()
{
var shell=新的ActiveXObject(“WScript.shell”);
shell.run(“iexplorehttp://www.google.com");
}

未来的读者可能也会觉得读起来很有趣。顺便说一句,我必须想办法从IE8中打开IE11,我正在仔细查看昨天打开的此类线程。
<html lang="en">

<head>

  <title>Open Window in different browser</title>
  <script type="text/javascript">

  function openFirefoxURL()

  {

      var shell = new ActiveXObject("WScript.Shell");

      shell.run("Firefox https://www.google.com/#safe=strict&q=brazil");

  }

  function openSafariURL()

  {

      var shell = new ActiveXObject("WScript.Shell");

                  shell.run("Safari https://www.google.com/#safe=strict&q=brazil");

  }

  function openChromeURL()

  {

      var shell = new ActiveXObject("WScript.Shell");

                  shell.run("Chrome https://www.google.com/#safe=strict&q=brazil");

  }

    function openIE11URL()

  {

      var shell = new ActiveXObject("WScript.Shell");

                  shell.run("iexplore http://www.google.com");

  }

  </script>

</head>

<body>





<input type="button" onclick="openFirefoxURL()" value="Open Google in Firefox"> <!-- working -->

<input type="button" onclick="openSafariURL()" value="Open Google in Safari"> <!-- working -->

<input type="button" onclick="openChromeURL()" value="Open Google in Chrome"> <!-- working -->

<input type="button" onclick="openIEURL()" value="Open Google in IE 11"> <!-- NOT working -->



<a href="javascript:exec('C:\\Program Files\\Internet Explorer\\iexplore.exe', '-nomerge http://www.google.com');">ie 11</a>  <!-- NOT working -->

</body>

</html>