Use jquery. when Ajax requests data, to avoid repeated requests, You need to disable the request submission button. Generally, this is relatively simple. You only need to add the disabled attribute to the button. A test instance is written below, describes how to disable a button.
InstanceCodeAs follows:
1. Include the file part and reference the jquery File
 
 
 
  
  - <SCRIPT src = "http://code.jquery.com/jquery.js” type =" text/JavaScript "> </SCRIPT>
  
 
 
 
 
Ii. html Section
 
 
 
<Button id = "test"> test </button>
 
 
 
<Div id = "result"> </div>
 
 
 
Define a test button and a result display Div Layer
 
 
 
Iii. Javascript
 
 
 
 
 
<SCRIPT type = "text/JavaScript"> 
Jquery (document). Ready (  Function (){ 
Jquery ("# test"). Click (  Function (){ 
Jquery (  This ). ATTR ({"disabled": "disabled "}); 
Biuuu. _ Ajax (); 
}); 
}); 
  VaR Biuuu = {}; 
Biuuu. _ Ajax =  Function (){ 
Jquery. Ajax ({ 
URL: “biuuu.html ", 
Success:  Function (HTML ){ 
Jquery ("# result"). append (HTML ); 
} 
}); 
Jquery ("# test"). removeattr ("disabled "); 
} 
</SCRIPT> 
 
 
 
 
 
When you click the test button, use jquery (this ).ATTR({"Disabled": "disabled"}) to disable the test button, add a disabled attribute to the test button, and then execute biuuu. _ Ajax () request. when the request is complete, use jquery ("# test ").Removeattr("Disabled") statement to remove the disabled button attribute, it is very easy to enable the disabled button.
 
 
 
Learn more about jqueryATTRAndRemoveattrTwo functions are actually elements.DisabledAttribute.