html ( jquery注意记得引入 )
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<script src="scripts/jquery-2.1.3.js"></script>
<style type="text/css">
.gotoIE {
border:1px solid blue;font-size: #fff;
width: 100px;
padding: 5px 10px;
}
</style>
</head>
<body>
<div class="gotoIE">跳转IE浏览器</div>
<script>
$(document).ready(function(){
$(".gotoIE").click(function(){
var url ='//www.greatytc.com';
window.location.href = "openIE:" + url ;// 使用IE打开
});
});
</script>
</body>
</html>
新建文件(复制下面代码,最后一行改为自己的IE执行地址,就是exe文件路径),将文件另存为,修改后缀为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页面就可以了