由网友(敷衍已成傷)分享简介:我要显示从数据库中的数据到一个页面。我使用AJAX和PHP。但是,是不是即将到来的新的更新数据。如果我刷新页面,则显示出新的更新数据。请给我说说,或一些链接,例如一些想法。I want to show the data from database into a page.I am using AJAX an...
我要显示从数据库中的数据到一个页面。 我使用AJAX和PHP。 但是,是不是即将到来的新的更新数据。 如果我刷新页面,则显示出新的更新数据。 请给我说说,或一些链接,例如一些想法。
I want to show the data from database into a page. I am using AJAX and PHP. But there is not coming new updates data. If i refresh the page, then it is showing new updates data. Please give me some idea about it or some links for example.
由于事先大家。
推荐答案
有两点原因为,要么缓存或你的控制不会等到你的Ajax响应回来。 试试这个:
There is two reason for that either cache or your control will not wait until your response of ajax is come back. try this:
$.ajax({
type: "POST",
url: "<your file url>",
data: {<arguments>},
cache: false,
async:false,
success: function(data) {
}
});
相关推荐
最新文章