其他浏览器跳转到IE浏览器

372 阅读1分钟

1、先新建文件 chromeOpenIE.reg

Windows Registry Editor Version 5.00
 
[HKEY_CLASSES_ROOT\chromeOpenIE]
@="IE"
"URL Protocol"=""
 
[HKEY_CLASSES_ROOT\chromeOpenIE\DefaultIcon]
@="iexplore.exe,1"
 
[HKEY_CLASSES_ROOT\chromeOpenIE\shell]
 
[HKEY_CLASSES_ROOT\chromeOpenIE\shell\open]
 
[HKEY_CLASSES_ROOT\chromeOpenIE\shell\open\command]
@="\"C:\\Program Files\\chromeOpenIE\\openIE.bat\"\"%1\""

2、新建文件openIE.bat

@echo off
set m=%1%
set m=%m:chromeOpenIE:=%
start "" "C:\\Program Files\\Internet Explorer\\iexplore.exe" %m%
exit

3、 WinRAR压缩成openIE.exe文件

  • 选择三个文件压缩
  • 改名为chromeOpenIE.exe
  • 勾选"创建自解压格式压缩文件"
  • 选择"高级"中的"自解压文件选项"
  • "常规" 填写 "解压路径" 填上 C:\Program Files\chromeOpenIE
  • "设置" 填写 "解压后运行" 填上 C:\Program Files\chromeOpenIE\chromeOpenIE.reg
  • "模式" 勾选 "隐藏启动对话框"
  • "高级" 勾选 "请求管理员密码"
  • "更新" "覆盖模式" 中勾选 "覆盖所有文件"
  • 确定

4、执行chromeOpenIE.exe文件;

5、在html中执行 在路径前面拼chromeOpenIE:targetUrl;js跳转同理

<a href="chromeOpenIE:https://www.runoob.com/cssref/css3-pr-background.html">chrome打开IE</a>

6、注意事项

IE的存放路径是默认的C:ProgramFilesInternetExploreriexplore.exe\color{red} {IE 的存放路径是默认的 C:\\Program Files\\Internet Explorer\\iexplore.exe}

其实不止谷歌浏览器,火狐浏览器也能跳转!