美文网首页
jquery Ajax 实现加载数据前动画效果的示例代码

jquery Ajax 实现加载数据前动画效果的示例代码

作者: lovelydong | 来源:发表于2017-10-26 22:01 被阅读0次
$(document).ready(function(){
$.ajax({
type:"get",
cache:false,
url:"ajaxpage.aspx?t=getcity",
dataType:"json",
beforeSend:function(){
![](http://www.jianshu.com/images/loading.gif)

$("#vvv").append('');
},
success:function(data){
$("#city").html(data.info);//添加下拉框的option
},
complete: function() {$("#vvv").remove();
}
})
})

相关文章

网友评论

      本文标题:jquery Ajax 实现加载数据前动画效果的示例代码

      本文链接:https://www.haomeiwen.com/subject/oodlpxtx.html