定义多少秒后跳转到别的页面

setTimeout(function(){window.location.href = "http://www.baidu.com"},20000);

一个函数就可以了

1000等于一秒

原文地址:https://www.cnblogs.com/lcxin/p/10900313.html