如何在ajax上成功加载整个html?

时间:2011-03-03 10:56:22

标签: javascript jquery ajax

$.ajax({
        type:'GET',
        url:"/" ,
        data:{"foo": foo}, //foo is a var
        success:ƒ(data) {
            here I want to load the whole html which I am sending from my views.
        }

});

1 个答案:

答案 0 :(得分:1)

根据您要放置它的位置,将其视为成功:

success: function(data) {
     $('#landingDiv').html(data);   
}

您也可以应用某些类或删除加载器。