ajax请求 apend,jsp如何获取ajax append的数据?
該樓層疑似違規(guī)已被系統(tǒng)折疊?隱藏此樓查看此樓
我在網(wǎng)上下了個上傳圖片的js,我想上傳圖片的時候還提交一些參數(shù),但是后臺用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) {
}
});
}
}
總結(jié)
以上是生活随笔為你收集整理的ajax请求 apend,jsp如何获取ajax append的数据?的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: sae mysql 同步本地_MYSQL
- 下一篇: SVM多分类器的实现