我得到如下回应HTML()不检索整个内容
<div id="weblogs">
<tr>
<td nowrap class="bl">1</td>
</tr>
<tr>
<td nowrap class="bl">2</td>
</tr>
</div>
现在我试图附加类似下面的行:
function _ajax(postData)
{
loadUrl = "getweblogs.asp";
$.ajax({
url : loadUrl, // your ajax file
type : 'post',
data : postData,
success : function(resp) {
alert($("#weblogs" , resp).html());
$('#weblogs > tbody:last').append($("#weblogs" , resp).html());
}
});
return false;
}
的更换工作正常。我的问题是,响应中的htmls元素被删除。我只得到1和2.而不是
<tr>
<td nowrap class="bl">1</td>
</tr>
<tr>
<td nowrap class="bl">2</td>
</tr>
我不知道我做错了什么。有人能给我任何线索吗?
谢谢!
问候 玛格达
你的意思是说你只得到1和2? – Karolis
你意识到你没有tbody元素,不是吗? –
喜karolis,