<script type="text/javascript" src="jquery-1.3.2.js"></script> 
<script type="text/javascript"> 
$(function() { 
$("#loading_img").click( 
function() 
{ 
$.ajax({ 
type:"GET", 
url:"demo.php", 
data:"name=wuxiaoyong", 
beforeSend:loading,//执行ajax前执行loading函数.直到success 
success:Response //成功时执行Response函数 
}) 
} 
) 
}); 
function loading(){ 
$('#loading_img').html('<img src="images/loading.gif"/>'); 
} 
function Response(data){ 
$('#loading_img').html(data); 
} 
</script> 

<div >点击加载</div>

相关文章:

  • 2021-10-26
  • 2022-01-31
  • 2021-10-06
  • 2022-12-23
  • 2022-12-23
  • 2021-07-06
  • 2022-12-23
  • 2021-11-19
猜你喜欢
  • 2022-12-23
  • 2021-08-22
  • 2022-12-23
  • 2021-10-21
  • 2022-12-23
  • 2022-12-23
  • 2021-04-16
相关资源
相似解决方案