jquery ajax 参数讲解网址: 点击查看
???????$.ajax({ ???????????type: "post", ???????????url: "url", ???????????data: { ???????????????"id": id ???????????}, ???????????async:true, // 异步请求 ???????????cache:false, // 设置为 false 将不缓存此页面 ???????????dataType: ‘json‘, // 返回对象 ???????????success: function(data) { ???????????????console.log(data); ???????????}, ???????????error: function(data) { ???????????????// 请求失败函数 ???????????????console.log(data); ???????????} ???????})
jquery ajax请求简单实例
原文地址:https://www.cnblogs.com/yaowan/p/8989474.html