首页 > Web开发 > 详细

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

时间:2018-01-29 15:10:43      阅读:1114      评论:0      收藏:0      [点我收藏+]

前台运行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

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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!