loading 加载

<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="data:images/loading.gif"/>');
}
function Response(data){
$('#loading_img').html(data);
}
</script> <div id="loading_img">点击加载</div>
上一篇:jQuery 禁用select和取消禁用之disabled


下一篇:解决MySQL workbench的Can't connect to MySQL server on '127.0.0.1'(10061)问题