kivi
jQuery定时加载
<html>
<head>
<script src="jquery.js" type="text/javascript"></script>
<script>
$(document).ready(
    function () 
    {
        //定时执行SetMsgValue函数
        setInterval("SetMsgValue()",50);
    }
 );

function SetMsgValue()
{
    //向<div id="Msg">中追加内容
    $("#Msg").append((new Date()).toString());
}
</script>
</head> 

<body>  
<div id="Msg">If you click on me, I will disappear.</div>
</body>

</html> 

jQuery延迟加载


只需将setInterval函数改为setTimeout即可!

 

分类:

技术点:

相关文章:

  • 2021-07-11
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-29
猜你喜欢
  • 2021-04-11
  • 2021-11-29
  • 2021-11-29
  • 2022-01-14
  • 2022-12-23
  • 2022-01-16
  • 2021-11-07
相关资源
相似解决方案