下面是我的代码。不明白为什么它在 IE 中有效但在 firefox 中无效。任何帮助将非常感激。
$(document).ready(function() {
var delay = 30000;
setTimeout(function () {
window.location.replace = "Index";
}, delay);
});
最佳答案
改变
window.location.replace = "Index";
至
window.location.replace("Index");
使用replace
var delay=30000;
setTimeout(function () {
window.location.replace("Index");
}, delay);
关于jquery - SetTimeout 在 FireFox 中不起作用,但在 IE 中正常,想知道为什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24865768/