强制使用IE浏览器打开链接方法

  • Post author:
  • Post category:其他



openIE.text文件

将下面的内容保存为 .reg 文件,然后双击直接运行即可完成协议添加(最后一行的IE地址在64位的机器上会有不同需要修改一下)
------------------------------------------------------------------------------------------------------------------------------------
Windows 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]
@="cmd /c set m=%1 & call set m=%%m:openIE:=%% & call \"C:\\Program Files\\Internet Explorer\\iexplore.exe\" %%m%% & exit"
------------------------------------------------------------------------------------------------------------------------------------

测试方法:<a href="openIE:www.baidu.com">百度</a>


openIe.reg文件

Windows 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]
@="cmd /c set m=%1 & call set m=%%m:openIE:=%% & call \"C:\\Program Files\\Internet Explorer\\iexplore.exe\" %%m%% & exit"


html


<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Document</title>
</head>
<body>
<a href="openIE:www.baidu.com">百度</a>
</body>
</html>



版权声明:本文为weixin_42729938原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。