Requested 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 you synchronize or asynchronously request a URL in Ajax, there is a wait procedure when you want to respond to a request that is returned.
Success:function (Request) {onsuccess (request,ismask);},error:function (e) {if (ismask) $ (' #div_mask '). Unblock () ;},beforesend:function (e) {if (Ismask)
$ (' #div_mask '). Block ({message: ' '});}
1, where success is followed by a method that is removed after a successful return response ({onsuccess).
2, error is the wrong time to tune the method (Error:function (e) {if (ismask) $ (' #div_mask '). unblock (); )。 Unblock () is a jquery.blockUI.js method to turn off scrolling when something goes wrong.
3, in the back of the beforesend is in response to send data, start to invoke the method $ (' #div_mask '). Block ({message: ' '},
block is a jquery.blockUI.js method,Open the div for scrolling.
Effects Chart: