$.ajax()不同content-type的传值方式

1.application/x-www-form-urlencoded        以form-data格式传值

(1)data的值为字符串,则传值会将这个字符串当成一个key

$.ajax()不同content-type的传值方式

(2)data的值为一个对象,则以正确的键值对的格式传值

$.ajax()不同content-type的传值方式

2.multipart/form-data 和  application/json

(1)data的值为JSON字符串,则以对象的方式传值

$.ajax()不同content-type的传值方式

(2)data的值为一个对象 则转成&和=连接的字符串

$.ajax()不同content-type的传值方式