该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
我在网上下了个上传图片的js,我想上传图片的时候还提交一些参数,但是后台用request.getParameter("th");获取出来是null
function uploadSubmitHandler () {
if (state.fileBatch.length !== 0) {
var data = new FormData();
for (var i = 0; i < state.fileBatch.length; i++) {
data.append('files['+i+']', state.fileBatch[i].file, state.fileBatch[i].fileName);
}
data.append('th', $('#th option:selected').val());
data.append('uid', $('#author').val());
$.ajax({
type: 'POST',
url: options.ajaxUrl,
data: data,
cache: false,
contentType: false,
processData: false,
success: function (result) {
window.location.href = url;
},
error: function (result) {
}
});
}
}