You may have seen the effect of uploading and rolling wait on many occasions. This article will introduce jquery. blockUI. js implements the upload scroll wait effect. If you are interested, do not miss it. I hope it will help you with the requested url:
The Code is as follows:
Function request (url, onSuccess, paras, method, isAsync, isMask ){
$. Ajax ({type: method, url: url, async: isAsync, data: paras, success: function (request) {onSuccess (request, isMask);}, error: function (e) {if (isMask)
$ ('# P_mask '). unblock () ;}, beforeSend: function (e) {if (isMask) $ ('# p_mask '). block ({message :''});}});
}
When a url is synchronously or asynchronously requested in ajax, there is a waiting process to respond to the returned request.
The Code is as follows:
Success: function (request) {onSuccess (request, isMask) ;}, error: function (e) {if (isMask) $ ('# p_mask '). unblock () ;}, beforeSend: function (e) {if (isMask)
$ ('# P_mask'). block ({message :''});}
1. Here, success is followed by the method removed after a successful response is returned ({onSuccess ).
2. error indicates the method to be called when an error occurs (error: function (e) {if (isMask) $ ('# p_mask'). unblock ();}). Unblock () is the jquery. blockUI. js method. When an error occurs, turn off the scroll.
3. beforeSend sends data in response and starts to call the method $ ('# p_mask'). block ({message :''},
Block is the jquery. blockUI. js method. Open p to scroll.
: