# Ajax请求设置Type为Form-Data

在你Ajax请求中加上

headers : {
	'Content-Type' : 'application/x-www-form-urlencoded'
},
1
2
3

示例:

$.ajax({
	type : "POST",
	url : "../user/repwd",
	headers : {
	  'Content-Type' : 'application/x-www-form-urlencoded'
	},
	data : data,
	dataType : "json",
});
1
2
3
4
5
6
7
8
9