In the load, wait for the DIV:
<div id= "Load" class= "Center-in-center" style= "Display:none;" > Loading, please wait for ...</div>
To determine the reset button:
<Divclass= "Form-group row"> <Divclass= "conf"style= "Float:left"onclick= "conf ()"ID= "conf">Are you sure</Div> <Divclass= "Reset"style= "Float:left"onclick= "Reset ()"ID= "Reset">Reset</Div></Div>
Load, please wait for the CSS style, set it to the center of the page:
. center-inch-center{Position:absolute; Top: -%; Left: -%; -webkit-transform:translate (- -%, - -%); -moz-transform:translate (- -%, - -%); -ms-transform:translate (- -%, - -%); -o-transform:translate (- -%, - -%); Transform:translate (- -%, - -%); }
Ajax Commit Code:
$.ajax ({type: ' POST '), URL:"", data: {},//JSON dataBeforesend:function(XMLHttpRequest) {$ ("#load"). Show (); $("#conf"). Removeattr ("onclick");//During the commit process, make sure the button is set to not clickable (Method 1)//$ (' #conf '). attr (' onclick ', ' javascript:void (0); '); /Set the button to not clickable (Method 2)}, Success:function(resultmessage) {$ ("#load"). Hide (); varResultmessage = eval (' (' + resultmessage + ') '); alert (Resultmessage.result); if(resultmessage.result) {alert (resultmessage.message); $("#conf"). attr ("onclick", "conf ();");//submit successful, set button to clickable}Else{alert (resultmessage.message); $("#conf"). attr ("onclick", "conf ();"); } },//datatype:datatype});
In the load, wait for the action to be: $ ("#load") in Beforesend. Show () shows the picture in success $ ("#load"). Hide () hides the image to
Button Commit restriction action: Set the button in Beforesend, respectively, and then set the button again in success to submit it after the submission is successful.
JavaScript in the AJAX submission Process page display loading, please wait for the effect, and in the submission process to limit the determination of the button to prevent multiple submissions, after the completion of the submission, the release limit