- 提示IE不支援, 由Edge開啟. 原IE導向其他頁面
<script>
if (/MSIE
\d|Trident.*rv:/.test(navigator.userAgent)) {
alert("IE is not supported.");
window.location
= 'microsoft-edge:' + location.href;
setTimeout(function
() {
window.location.href = 'https://localhost';
//window.close();
}, 1);
}
</script>
- 直接轉Chrome開啟, 原IE導向其他頁面
<script>
if (/MSIE
\d|Trident.*rv:/.test(navigator.userAgent)) {
var
objShell = new ActiveXObject("WScript.Shell");
setTimeout(function () {
//history.go(-2);
window.location.href
= 'https://localhost';
//window.close();
}, 1);
}
</script>
沒有留言:
張貼留言