页面ajax加载时,出现旋转的圈,应该写在ajax代码的什么位置?

$.ajax({
    url:'/',
    type:'get',
    beforeSend:function () {
        // 显示loading
    },
    success:function (data) {
        // 处理数据
    },
    complete:function(){
        // 隐藏loading
    }
});

 

posted on 2020-10-13 17:37  闪亮的金子  阅读(267)  评论(0编辑  收藏  举报