jQuery/Ajax刷新而不重新加载或加载页面吗? [英] Jquery/Ajax Refresh without reload or load the page?
本文介绍了jQuery/Ajax刷新而不重新加载或加载页面吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个报告页面,该页面动态生成记录并保存在数据库中.从数据库中,我需要显示页面中动态更新的记录,而无需重新加载或使用setInterval时间函数加载内容.
I have a report page which dynamically generate the record and saved in the database. From database i need to show the dynamically updated records in the page without reload or load the contents using setInterval time function.
推荐答案
请参阅我的问题并与其一起使用setInterval函数
and use setInterval function with it
var refreshId = setInterval(function()
{
$("#yourContainer").load('yourPage.php');
}, 5000);
offcourse Jquery对此是必不可少的...因此从这里下载 jQuery 并将其包含在您的页面中
offcourse Jquery is prereq for this... so download jQuery from here and include it in your page
<script href="yourlink to the file"></script>
这篇关于jQuery/Ajax刷新而不重新加载或加载页面吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文