标签:stat status 成功 == span style ica 使用 app
//上传附件 var uploadAnnex = function(){ //alert("??"); //document.getElementById(‘submitFile‘).onclick = function(event){ var applicationId = $("#applicationId").val(); if(event.preventDefault){//取消按钮默认提交行为 event.preventDefault(); } else { event.returnValue = false; } var formDOM = document.getElementById(‘fileForm‘); var formData = new FormData(formDOM);//创建formData对象 var req = new XMLHttpRequest(); req.open("POST", baseUrl +"/suspicious/upLoadFile?applicationId="+applicationId);//使用POST发送请求 req.onload = function(event){ if(this.status === 200){ console.log(this.response);//请求成功后打印返回的结果 } } req.send(formData); req = null; //} }
标签:stat status 成功 == span style ica 使用 app
原文地址:http://www.cnblogs.com/ShaoXin/p/7825334.html