java使用AjaxUpload.js实现上传文档的时候需要注意哪些?我跟我的同事的差不多,但是就是无法上传,连选择文件的弹窗都不出来。下面是jsp内容:
修改页面java 使用 AjaxUpload.js 实现上传文档的时候需要注意哪些? 我跟我的同事的差不多,但是就是无法上传,连选择文件的弹窗都不出来。下面是jsp内容:
修改页面上传文档*:
上传作答文件
![show.gif](%24%7Bctx%7D/images/show.gif)
//这个name的值跟实体类中的一致
function uploadFile(button) {
alert("++++++++++"+button);
new AjaxUpload(button,{
action: '${ctx}/test/upload22',
name: 'upload',
id:'upfile',
onComplete:function (file,response) {
alert("上传文档完毕");
var resule=eval("("+response+")");
if(resule.flag==true){
fileName = result.fileOldName;
fName = ""+fileName+"";
$("#file").val(result.relPath);
$("#upshow").html(fName);
$("#up-loading").hide();
$("#upshow").show();
}else{
parent.layer.alert("上传失败",{icon: 2, title:'提示'});
}
this.enable();
}
展开