liuhao-web
$.ajaxFileUpload({
url: urls.fileUploadUrl,//用于文件上传的服务器端请求地址
secureuri: false,//一般设置为false
type: \'post\',
async: false,
dataType: \'json\', //服务器返回的格式,可以是json或xml等
fileElementId: \'file\',//文件上传空间的id属性 <input type="file" id="file" name="file" />
success: function (data) {//服务器成功响应处理函数
console.log("uploadTemplate--->data:", data);

},
error: function (data, status, e) {//服务器响应失败处理函数
$.xcConfirm("服务器响失败", $.xcConfirm.typeEnum.info);
// $("#fileButton").html("上传失败").css("color","red")
}
});

分类:

技术点:

相关文章:

  • 2021-10-19
  • 2021-10-09
  • 2021-10-19
  • 2021-08-09
  • 2021-06-03
  • 2021-06-16
  • 2021-12-19
  • 2021-09-28
猜你喜欢
  • 2022-02-18
  • 2021-07-30
  • 2021-11-05
  • 2021-07-11
  • 2021-06-17
  • 2021-12-27
相关资源
相似解决方案