A5下载文章资讯

分类分类

JQUERY的AJAX请求缓存里的数据问题处理

2016-02-24 14:29作者:fang

参数type由get改成post

添加参数cache并设置成false

添加时间戳

$.ajax({

url: 'ios/index',

cache: false,

type: 'post',

data: {

timestamp: new Date().getTime()

//params here

},

dataType: 'json'

}).done(function (data) {

//codes here

});

是不是非常的简单呢,希望小伙伴们能够喜欢。

展开全部

相关

说两句网友评论
    我要跟贴
    取消