AJAX div无法正常工作

时间:2016-08-08 11:38:37

标签: jquery ajax

正在处理grails应用程序。我需要使用ajax检索数据库数据。我在更换内容时遇到问题,不必要地刷新标题。我的结构是:

<div id="header">
 <g:render template="/test/header"></g:render>
</div>
<div class="addrow">
 table content from db
</div>

我的代码是:

success: function(response){
 $(".addrow").html(response); 
}

它也刷新了标题,而不仅仅是数据。我也试过这些,但没有运气:

 $(".addrow").parent().html(response);
 $(".addrow").replaceWith(response);

现在我是否要避免刷新标题?

0 个答案:

没有答案