$.ajax(
{
url:'http://127.0.0.1:30080/api-a/quasiCustom/selectCustomList',
type:'post',
dateType:'json',
beforeSend: function(xhr) {
xhr.setRequestHeader("organId:'1333333333'");
},
headers:{'Content-Type':'application/json;charset=utf8','organId':'1333333333'},
data:JSON.stringify(org),
success:function(data){console.log("sucess");},
error:function(data){console.log("error");}
}
);

jquery ajax 设置请求头header 参数-LMLPHP

04-27 23:07