JQuery的ajax完整案列代码收藏

JQuery的AJAX完整案列代码
$.ajax({
type: "POST",
dataType: "JSON",
url: "11px.php",
data:{url:ur},
success:function(data,status){
console.log(data)
},
error:function(XMLHttpRequest,textStatus,errorThrown){
console.log(json_decode.msg)
}
});
ajax参数说明
type:get 或 post
dataType:'JSON', //返回的数据格式:json/xml/html/script/jsonp/text
data:提交参数
async:true, //或false 是否异步
timeout:5000,//超时时间
本文结束
 
       烟云博客
烟云博客                 
    
    


