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 () ;}, beforeSend: 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: ' '},
Block is the jquery. blockUI. js method. Open the div to scroll.
: