$.ajax({
url:"a/b",
data : JSON.stringify(param),
// contentType: 'application/json', //方法1
headers: {
'Content-Type': 'application/json'
},//方法2
type : 'post',
dataType : 'json',
success : function(data){
console.log(JSON.stringify(data));
}
});
两种方式均可以。