- HTML code
$.ajax({ url: "www.aaa.com", cache: false, data: {}, type: "GET", success: function(html) { $.popbox.setcontent( html ); }
我希望在调用这个方法的时候,页面放一个gif图片提示用户正在loading
请问该在这个方法里怎么加才能做到提交之后,服务器response之前显示loading图片啊
------解决方案--------------------
$.ajax({
url: "www.aaa.com",
cache: false,
data: {},
type: "GET",
beforeSend: function(){
$('节点').html('<img src="/assets/images/ajax.gif"/>');
},
success: function(html){
$.popbox.setcontent( html );
}
}