$.ajax({ type: "post",//请求方式 url: "http://www.baidu.com",//请求地址 data: { "id":"1" },//请求参数 cache: false, async : true, dataType: "json",//返回数据为json success: function (rey) { console.log(rey)//请求成功后,返回数据 }, error:function (XMLHttpRequest, textStatus, errorThrown) { console.log("请求失败!")//请求错误 } });