jquery.min.js?v=2.1.4:4 Uncaught TypeError: (b.contentType || "").indexOf is not a function

前台运行PUT时出现错误:jquery.min.js?v=2.1.4:4 Uncaught TypeError: (b.contentType || "").indexOf is not a function;

最后检查少了


原代码:
$.ajax({
type: 'PUT',
data: JSON.stringify(addData),
contentType:"application/json",
url: addr + "/information/update",
contentType: function () {
layerDialog = layer.msg('正在修改...',{
icon: 16, shade:0.5
});
html = "";
},

----------

改后代码:
type: 'PUT',
data: JSON.stringify(addData),
contentType:"application/json",
url: addr + "/information/update",
beforeSend: function () {
layerDialog = layer.msg('正在修改...',{
icon: 16, shade:0.5
});
html = "";
},

----------------
posted @ 2018-01-29 10:03  五星上酱程序员  阅读(639)  评论(0编辑  收藏  举报