我想在特定时间后加载另一个HTML页面 [英] I want to load another HTML page after a specific amount of time

查看:103
本文介绍了我想在特定时间后加载另一个HTML页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个html页面form1.html,它有一个动画图像。我想在5秒后加载另一个页面form2.html。如何做到这一点?

解决方案

< script> setTimeout(function(){ window.location.href = 'form2.html'},5000);< /脚本>

主页只添加'/'

 <脚本>的setTimeout(函数(){window.location.href = /},3000);< /脚本> 


I have one html page "form1.html" which has an animated image. I want to load another page "form2.html" after 5 seconds. How do I do this?

解决方案

<script>setTimeout(function(){window.location.href='form2.html'},5000);</script>

And for home page add only '/'

<script>setTimeout(function(){window.location.href="/"},3000);</script>

这篇关于我想在特定时间后加载另一个HTML页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆