Jquery. blockUI. js achieves the effect of rolling and waiting for upload
Source: Internet
Author: User
Request url: functionrequest (url, onSuccess, paras, method, isAsync, isMask) {$. ajax ({type: method, url: url, async: isAsync, data: paras, success: function (request) {onSuccess (reque request url: 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) $ ('# div_mask '). unblock () ;}, bef OreSend: function (e) {if (isMask) $ ('# div_mask '). block ({message: ''}) ;}}) ;}when a url is synchronously or asynchronously requested in ajax, there is a waiting process to respond to the returned request. Success: function (request) {onSuccess (request, isMask) ;}, error: function (e) {if (isMask) $ ('# div_mask '). unblock () ;}, beforeSend: function (e) {if (isMask) $ ('# div_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) $ ('# div_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 $ ('# div_mask '). block ({message: ''}, the block is jquery. blockUI. js method, open the div to scroll. :
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.