在chrome浏览器跳转到IE浏览器指定页面并传递参数
一、传递单个参数
1.新建alert.reg
Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\alert] @="URL: Alert Protocol" "URL Protocol"="" [HKEY_CLASSES_ROOT\alert\DefaultIcon] @="iexplore.exe,1" [HKEY_CLASSES_ROOT\alert\shell] [HKEY_CLASSES_ROOT\alert\shell\open] [HKEY_CLASSES_ROOT\alert\shell\open\command] @=" cmd /c set m=%1 & call set m=%%m:alert:=%% & call \"C:\\Program Files\\Internet Explorer\\iexplore.exe\" %%m%%"
2.测试链接
<a href="alert://www.baidu.com?a=1" />test
二、传递多个参数
1.新建alert.reg
Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\alert] @="URL:Alert Protocol" "URL Protocol"="" [HKEY_CLASSES_ROOT\alert\DefaultIcon] @="iexplore.exe,1" [HKEY_CLASSES_ROOT\alert\shell] [HKEY_CLASSES_ROOT\alert\shell\open] [HKEY_CLASSES_ROOT\alert\shell\open\command] @="\"D:\\openIE.bat\" \"%1\""
2.新建openIE.bat
@echo off set m=%1% set m=%m:alert:=% start "" "C:\\Program Files\\Internet Explorer\\iexplore.exe" %m% exit
3.执行注册表文件
REGEDIT /S alert.reg
4.测试链接
<a href="alert://www.baidu.com?a=1&b=2" />test