第一种方法:
$.ajax({ type:
'POST', url:url, data:obj, dataType:'json', beforeSend: function () { load(); }, complete: function () { disLoad(); }, success:function(data){ showMessage(data); } });
//弹出加载层
function load() {  
    $("<div class=\"datagrid-mask\"></div>").css({ display: "block", width: "100%", height: $(window).height() }).appendTo("body");  
    $("<div class=\"datagrid-mask-msg\"></div>").html("邮件发送中,请稍候。。。").appendTo("body").css({ display: "block", left: ($(document.body).outerWidth(true) - 190) / 2, top: ($(window).height() - 45) / 2 });  
}
//取消加载层  
function disLoad() {  
    $(".datagrid-mask").remove();  
    $(".datagrid-mask-msg").remove();  
}
第二种方法:

$.ajax({ type:
'POST', url:url, data:obj, dataType:'json', beforeSend: function () {   $.messager.progress({   title: '提示',   msg: '文件上传中,请稍候……',   text: ''   }); }, complete: function () { $.messager.progress('close'); }, success:function(data){ $("#uploadHtmlUrl").val(data.fileUrl); $("#uploadHtml").attr("src", data.fileUrl); } });

相关文章:

  • 2021-06-10
  • 2022-02-21
  • 2021-10-13
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-28
  • 2021-08-07
猜你喜欢
  • 2022-12-23
  • 2021-09-09
  • 2022-12-23
  • 2021-12-11
  • 2021-09-21
  • 2021-10-03
相关资源
相似解决方案