Home  >  Article  >  Web Front-end  >  jquery实现加载等待效果示例_jquery

jquery实现加载等待效果示例_jquery

WBOY
WBOYOriginal
2016-05-16 17:21:221141browse
复制代码 代码如下:

var dates = this.options.form.getWidgetByName("dates").getValue();
$.ajax({
url: "http://127.0.0.1:9009/Brilliantzz/service/snproduct.do",
data:dates,
beforeSend:function() {
var h = document.body.clientHeight;
$("
").css({display:"block",width:"100%",height:h}).appendTo("body");
$("
").html("正在上传生产数据,请稍候。。。").appendTo("body").css({display:"block",
left:($(document.body).outerWidth(true) - 190) / 2,
top:(h - 45) / 2});

},
complete:function(data) {
$('.datagrid-mask-msg').remove();
$('.datagrid-mask').remove();
},
success: function(data) {
alert("生产数据:"+data);
},
error: function(data) {
alert("上传生产数据异常!");
}
});
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn