contentType: 'application/json',
contentType: 'application/json'
,但是变成了这样
找了好多资料也没找到关键点,求解答。截图实在chrome浏览器下
PHP中文网2017-04-11 09:56:45
var data = {a: 1, b: 2};
$.ajax({
url: "/",
type: "post",
contentType: "application/json",
data: JSON.stringify(data)
});
注意JSON.stringify
。