我有一个名为"form1.html"的html页面,其中包含一个动画图片。我希望在5秒后加载另一个页面"form2.html"。我该如何做到这一点?
我有一个名为"form1.html"的html页面,其中包含一个动画图片。我希望在5秒后加载另一个页面"form2.html"。我该如何做到这一点?
<script>
setTimeout(function(){
window.location.href = 'form2.html';
}, 5000);
</script>
对于主页只需添加'/'
<script>
setTimeout(function(){
window.location.href = '/';
}, 5000);
</script>
<meta http-equiv="refresh" content="5;URL='form2.html'">
使用以下 JavaScript 代码:
<script>
setTimeout(function(){
window.location.href = 'form2.html';
}, 5000);
</script>
<body onload="setTimeout(function(){window.location = 'form2.html';}, 5000)">