Jquery easyui 下loaing效果示例代码


//采用jquery easyui loading css效果
function ajaxLoading(){
&nbsp;&nbsp; &nbsp;$("<div class=\"datagrid-mask\"></div>").css({display:"block",width:"100%",height:$(window).height()}).appendTo("body");
&nbsp;&nbsp; &nbsp;$("<div class=\"datagrid-mask-msg\"></div>").html("正在处理,请稍候。。。").appendTo("body").css({display:"block",left:($(document.body).outerWidth(true) - 190) / 2,top:($(window).height() - 45) / 2});
&nbsp;}
&nbsp;function ajaxLoadEnd(){
&nbsp;&nbsp; &nbsp; $(".datagrid-mask").remove();
&nbsp;&nbsp; &nbsp; $(".datagrid-mask-msg").remove();&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;
}

$.ajax({
type: 'POST',
url: 'sendLettersAgain.action',
data: {id:obj.id},
beforeSend:ajaxLoading,\\发送请求前打开进度条
success: function(robj){
ajaxLoadEnd();\\任务执行成功,关闭进度条
}
});

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wdzsxj.html