IE
Chrome 中打开 IE 浏览器,跳转到指定页面并传递参数
为方便使用,使用winrar
将指定目录打包为exe
,参考文档《Windows-winrar打包exe.md》
示例
1
2
3
4
5
6
7
8
9
10
<html lang="en">
<head>
<meta charset="UTF-8">
<title>调用本地 IE 浏览器打开百度首页</title>
</head>
<body>
<a href="openIE://www.baidu.com?a=1&b=2" />百度一下
</body>
</html>runreg.bat
1
REGEDIT /S openIE.reg
openIE.reg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\openIE]
@="URL:openIE Protocol"
"URL Protocol"=""
[HKEY_CLASSES_ROOT\openIE\DefaultIcon]
@="iexplore.exe,1"
[HKEY_CLASSES_ROOT\openIE\shell]
[HKEY_CLASSES_ROOT\openIE\shell\open]
[HKEY_CLASSES_ROOT\openIE\shell\open\command]
@="\"C:\\Program Files\\openIE\\openIE.bat\" \"%1\""openIE.bat
1
2
3
4
5
6
7
8
9
10
11
12
13@echo off
set m=%1%
set m=%m:openIE:=%
IF "%PROCESSOR_ARCHITECTURE%" == "x86" (
start "" "C:\\Program Files\\Internet Explorer\\iexplore.exe" %m%
) ELSE (
IF "%PROCESSOR_ARCHITECTURE%" == "X86" (
start "" "C:\\Program Files\\Internet Explorer\\iexplore.exe" %m%
) ELSE (
start "" "C:\\Program Files (x86)\\Internet Explorer\\iexplore.exe" %m%
)
)
exit
IE 浏览器打开其他浏览器
1 | function start(){ |
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 王文哲的博客!