从Chrome中的链接启动IE

top*_*at3 9 internet-explorer google-chrome registrykey

我希望在Chrome中有一个链接,例如

打开链接

当您在Chrome浏览器中单击它时,它会在IE窗口中启动链接.

任何人都可以解释如何做到这一点.我相信这是可能的,可能涉及在注册表中添加一些设置

ps:我不能使用任何浏览器扩展,例如IETab或其中任何一个.它必须在机器上启动IE.

top*_*at3 6

好的,所以我做了以下工作:

HKEY_CLASSES_ROOT
   alert
      (Default) = "URL:Alert Protocol"
      URL Protocol = ""
      DefaultIcon
         (Default) = "iexplore.exe,1"
      shell
         open
            command
               (Default) = cmd /k set myvar=%1 & call set myvar=%%myvar:alert:=%% & call "C:\Program Files (x86)\Internet Explorer\iexplore.exe" %%myvar%% & exit /B
Run Code Online (Sandbox Code Playgroud)

然后有你的链接

<a href="alert:www.google.ie">link</a>
Run Code Online (Sandbox Code Playgroud)

  • 能否请您详细说明如何使用此脚本在Chrome浏览器中打开IE链接? (3认同)
  • 我想知道你是如何在Web应用程序中实现的,并详细介绍了在Windows中创建HKEY处理程序的步骤 (3认同)

小智 6

上面的所有答案都提到了HKEY_CLASSES_ROOT,但是我们如何使用它呢?在哪里使用它?它没有被提及。

但现在我有了解决方案,请按照以下步骤操作。

  1. 打开新记事本并在记事本中粘贴以下代码
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\iehttp]
@="URL:Open with IE Protocol"
"URL Protocol"=""
[HKEY_CLASSES_ROOT\iehttp\shell]
[HKEY_CLASSES_ROOT\iehttp\shell\open]
[HKEY_CLASSES_ROOT\iehttp\shell\open\command]
@="cmd /V /C \"set URL=%1&& set URL=!URL:iehttp=http!&&cmd /c \"\"C:\\Program Files (x86)\\Internet Explorer\\iexplore.exe\"\" !URL!\""
Run Code Online (Sandbox Code Playgroud)
  1. Ctrl + s
  2. 命名如下:iphttp.reg+ 保存在桌面
  3. iphttp.reg从桌面双击文件后,首先弹出单击是

从注册表端完成,无需刷新或重新启动计算机。它将提供两个测试链接:

 <a href="http://www.google.com" target="_blank">Open Same Browser</a>
 <a href="iehttp://www.google.com">Open With IE</a>
Run Code Online (Sandbox Code Playgroud)

就是这样。它现在工作正常。

限制:从 Jquery、Javascript 来看,它不符合我的理解。

  • 解释解决方案的唯一答案 - 谢谢! (3认同)

归档时间:

查看次数:

29299 次

最近记录:

6 年,1 月 前