該樓層疑似違規已被系統折疊?隱藏此樓查看此樓
我在網上下了個上傳圖片的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) {
}
});
}
}