Jquery中$.post和$.ajax的用法

5年以前  |  阅读数:464 次  |  编程语言:JavaScript 
$.ajax({

    type:'get',

    url:'https://www.www.phpernote.com/rss',

    beforeSend:function(XMLHttpRequest){

        //ShowLoading();

    },

    success:function(data,textStatus){

        $('.ajax.ajaxResult').html('');

        $('item',data).each(function(i,domEle){

            $('.ajax.ajaxResult').append('<li>'+$(domEle).children('title').text()+'</li>');

        });

    },

    complete:function(XMLHttpRequest,textStatus){

        //HideLoading();

    },

    error:function(){

        //请求出错处理

    }

});

Copyright© 2013-2020

All Rights Reserved 京ICP备2023019179号-8