兼容火狐几秒后跳转页面

<script>
var t = 3;
setInterval("testTime()", 1000); //启动1秒定时
function testTime() {
if (t == 0) {
window.location= http://www.qq.com;
Window.clearInterval();
} else {
if(navigator.appName.indexOf("Explorer") > -1){
document.getElementById('view').innerHTML=t;
} else{
document.getElementById('view').textContent = t;
}
t--; // 计数器递减
}
}
</script>
Author:Pale Life
From: 
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。
原文地址:https://www.cnblogs.com/live365wang/p/2228529.html