如何在10秒切换后隐藏并显示表格 [英] how do u hide and show a table after 10 seconds toggling

查看:82
本文介绍了如何在10秒切换后隐藏并显示表格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<table id =table1>
<tr>
<td>
Hide after 10 seconds
</td>
</tr>
</table>
<table id =table2>
<tr>
<td>
show after 10 seconds
</td>
</tr>
</table>


javascript

<script type="text/javascript">

   setTimeout({ jQuery("#table1").show(); }, 10000);

   setTimeout({ jQuery("#table1").show(); }, 20000);

</script>

my code does not work help please ?

推荐答案

<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script>


(document).ready(function(){
setInterval(function(){
(document).ready(function(){ setInterval(function(){


(#table1)。toggle()},10000);
});
< / script>
< / head>
< body>
< table id =table1border =1>
< tr>
< td>
Toogle每10秒
< / td>
< / tr>
< / table>
< / body>
< / html>
("#table1").toggle()}, 10000); }); </script> </head> <body> <table id="table1" border="1"> <tr> <td> Toogle every 10 seconds </td> </tr> </table> </body> </html>


这篇关于如何在10秒切换后隐藏并显示表格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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