chrome open ie
同事有一個需求,因為當時廠商的播放影片程式碼只能用IE才正常,但新的平台在發展時,定位跨瀏覽器的,所以就幫忙研究怎麼實踐這事… 其實自己以前也很好奇這件事情...
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Open with IE from Chrome</title>
</head>
<body>
<ul>
<li>
<a href="http://blog.darkthread.net" target="_blank">Open Blog</a>
</li>
<li>
<a href="iehttp://blog.darkthread.net">Open Blog with IE</a>
</li>
</ul>
<script>
/*
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\iehttp]
@="URL:Open with IE Protocol"
"URL Protocol"=""
[HKEY_CLASSES_ROOT\iehttp\shell]
[HKEY_CLASSES_ROOT\iehttp\shell\open]
[HKEY_CLASSES_ROOT\iehttp\shell\open\command]
@="cmd /V /C \"set URL=%1&& set URL=!URL:iehttp=http!&&cmd /c \"\"C:\\Program Files (x86)\\Internet Explorer\\iexplore.exe\"\" !URL!\""
*/
</script>
</body>
</html>
JSBIN 範例
參考來源:
其它相關文章: