jHeartbeat 是一个jQuery 的插件,用来按时执行某项义务,例如按时向效劳器发送申请;按时更新页面元素等等,特地适宜用正在谈天室开发上。
应用办法:
[code]
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src=js/jheartbeat.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$.jheartbeat.set({
url: "data.php", // The URL that jHeartbeat will retrieve
delay: 1500, // How often jHeartbeat should retrieve the URL
div_id: "test_div" // Where the data will be appended.
, function (){
// Callback Function
});
});
});
</script>
[/code]
应用办法:
[code]
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src=js/jheartbeat.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$.jheartbeat.set({
url: "data.php", // The URL that jHeartbeat will retrieve
delay: 1500, // How often jHeartbeat should retrieve the URL
div_id: "test_div" // Where the data will be appended.
, function (){
// Callback Function
});
});
});
</script>
[/code]
版权声明:除非特别标注,否则均为本站原创文章,转载时请以链接形式注明文章出处。