$.ajax({ url:url, type:'post', dataType:'json', headers: { "Content-Type": "application/json;charset=utf-8" }, contentType:'application/json; charset=utf-8', data:JSON.stringify({parkId:garageid,startTime:starttime,endTime:endtime,lockCode:parkingLotNumber}), success:function(){}請問contentType屬性和headers中設置的content-type有什么區別?為何我在headers中設置的content-type不生效?請求的header變成了text/html了,不知道原因
使用jquery ajax設置請求頭contentTpye不生效?請問為什么
楊__羊羊
2019-02-15 18:18:00