真机调试后,出现如下错误提示:
Uncaught TypeError: b.beforeSend.call is not a function at js/mui.min.js:6
代码如下:
mui.ajax(url, {
data: {
operation: 'add',
temp_id:document.getelementById('temp_id').value,
obj_class: 'UserRequest',
},
dataType: 'json',
type: 'post',
timeout:5000,
beforeSend: function(xhr) {
xhr.setRequestHeader('contentType', 'multipart/form-data')
xhr.setRequestHeader('Accept', 'application/json, text/javascript, /; q=0.01')
},
success: function(result) {
alert(JSON.stringify(result))
},
error: ajax.errback
})
z***@foxmail.com
- 发布:2016-09-13 14:35
- 更新:2016-09-13 14:35
- 阅读:1616
0 个回复