当前位置:首页 >> 网络编程

Jquery easyui 下loaing效果示例代码

编辑:jimmy
  日期: 2024/10/10 浏览:1 次
复制代码 代码如下:
//采用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();\\任务执行成功,关闭进度条
}
});
上一篇: checkbox设置复选框的只读效果不让用户勾选
下一篇: 多次注册事件会导致一个事件被触发多次的解决方法