id=
"view-form"
name=
"view-form"
method=
"post"
action=
"sys/shr/WfRdView!saveFileForMobile.shtml"
enctype=
"multipart/form-data"
>
type= "text" name= "wfRd.wfNo" value= "B161770000011" style= " display: none ; " >
type= "file" name= "files[0]" >
type="button" οnclick="doUpload()" class="btn btn-default btn-block">提交
type= "text" name= "wfRd.wfNo" value= "B161770000011" style= " display: none ; " >
type= "file" name= "files[0]" >
type="button" οnclick="doUpload()" class="btn btn-default btn-block">提交
function doUpload() {
var formData = new FormData($( "#view-form")[0]);
var url = "sys/shr/WfRdView!saveFileForMobile.shtml";
$.ajax({
url: url ,
type: 'POST',
data: formData,
async: false,
cache: false,
contentType: false,--此处必须设置false
processData: false,
success: function (returndata) {
alert("完成==="+returndata);
$("#tempCon").html(returndata);
},
error: function (returndata) {
alert("错误==="+returndata);
}
});
}