t-7.3s后跳转到指定url

1.在head 里添加下面代码

<meta http-equiv="refresh" content="3;URL=http://www.baidu.com">

<meta http-equiv="refresh" content="3;URL=/swt/swt.html">

2.settimeout  3s后打开

window.setTimeout(window.location.href='http://www.baidu.com',1000);
window.setTimeout(window.location.href='/swt',1000);



猜你喜欢

转载自www.cnblogs.com/stone5/p/9063953.html