ajax请求contentType与dataType
contentType:告诉服务器请求参数的类型(application/x-www-form-urlencoded、multipart/form-data、application/json、text/xml)
dataType:期待服务器返回的类型(json、text、html、xml、script、jsonp),如果不指定,JQuery将自动根据http包mime信息返回responseXML或responseText,并作为回调函数参数传递。
参考:
https://www.jianshu.com/p/10cdbb35ac87

浙公网安备 33010602011771号