码迷,mamicode.com
首页 > Web开发 > 详细

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

时间:2018-01-29 15:50:26      阅读:1801      评论:0      收藏:0      [点我收藏+]

标签:app   data   format   type   send   indexof   ring   end   err   

前台运行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 = "";
},

----------------

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

标签:app   data   format   type   send   indexof   ring   end   err   

原文地址:https://www.cnblogs.com/daguozb/p/8376009.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!