jquery:ajax()方法的标准写法

$.ajax({

  url:"https://www.baidu.com",//请求地址

  dataType:"xml",//数据类型(xml、html、script、text、json、jsonp)

  async:"true",//是否异步(false或者true;默认值为true)

  data:"{'键','值'}",//键值对的形式

  type:"GET",//请求格式GET和POST

  beforesend:function(){},

  success:function(){},

  complete:function(){},

  error:function(){},

})

原文地址:https://www.cnblogs.com/wangpengfei8313/p/7904250.html