5秒后Jquery显示按钮 [英] Jquery show button after 5 second

查看:88
本文介绍了5秒后Jquery显示按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我得到了这个按钮,我需要在5秒后显示。我没有jquery或javascript的经验

So I got this button that I need to show after 5 second. I have no experience in jquery or javascript

HTML代码

<body>
<p>You need to wait 0 before you can proceed</p>
<button type="button" id="proceed">proceed</button>
</body>

这是我在w3school阅读后能想到的最好的

This is the best that I could come up with after some reading in w3school

<script>
$(document).ready(function(){
$("#show").wait(function(){
  delay 0500  $("proceed").show();
});
</script>

任何人都可以帮助我吗?

Can anyone help me?

推荐答案

如果你不想使用jQuery,那么使用setTimeOut方法作为其他人的回答。

If you don't want to use jQuery, then use the setTimeOut method as answered by others.

<head>
<script type="text/javascript" src="//code.jquery.com/jquery-1.10.2.js"></script>
<script type="text/javascript">
  $('#proceed').delay(5000).show(0);   
</script>
</head>
<body>
<p>You need to wait 0 before you can proceed</p>
<button type="button" id="proceed" style="display: none;">proceed</button>
</body>   

这篇关于5秒后Jquery显示按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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