随着 Internet Explorer 10 通过标记删除浏览器检测,我需要一种新方法将使用 Internet Explorer 的用户重定向到新页面
我决定使用
<body>
<script type="text/javascript">
if (navigator.appName == 'Microsoft Internet Explorer')
{
self.location = "http://<url>"
}
</script>
,但什么也没有发生。 我确信我现在还没有看到一些小缺失。
最佳答案
改用这个:
window.location.href = "http://<url>";
正如 Vucko 所建议的那样,here is a way to detect IE using jQuery .
关于javascript - Internet Explorer 10 不重定向,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14131990/