Jquery Ajax Get示例

 

$.ajax({
    type: "GET",
    url:"ajax_url.php",
    cache: false,
    data:{'action':'ABC','website':'DDD'},
    dataType: "json",
    success:function(data){                        
        //var resultJson=jQuery.parseJSON(data);
        var resultJson=data;
        if(resultJson.length){
            var website=resultJson.website;            
            var servers=resultJson['AAA'].CCC;
        }    
    }
});
$.get(
        'ajax_url.php',
        {'action':'AAA','website':'BBB'},
        function(data){                        
            //....
        }
);
posted on 2014-08-14 15:07  思静  阅读(341)  评论(0编辑  收藏  举报