Home >Web Front-end >JS Tutorial >Example of jquery implementation of loading waiting effect_jquery

Example of jquery implementation of loading waiting effect_jquery

WBOY
WBOYOriginal
2016-05-16 17:21:221236browse
Copy code The code is as follows:

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 ("Uploading production data, please wait...").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("Production data:" data );
},
error: function(data) {
alert("Abnormal upload of production data!");
}
});
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