jQuery 定时局部刷新(setInterval)

melissahexiu 2010-11-19

代码如下:

<head> 
<script src="jQuery/jquery-1.4.1.min.js" type="text/javascript"></script> 
<script> 
$(document).ready(function () { 
setInterval("startRequest()",1000); 
}); 
function startRequest() 
{ 
$("#date").text((new Date()).toString()); 
} 
</script> 
</head>

相关推荐

Web全栈笔记 / 0评论 2020-06-15