1,有如下这样一段html
<div class="right" id="pending">
<table class="one" width="100%" border="0" cellspacing="0" cellpadding="0">
<tbody>
</tbody>
</table>
<div id="pendingpage" class="paging">
</div>
</div>
2,我用jquery动态填充tbody下的内容代码如下
$("#pending table tbody").empty().append(th).append(html);
这段代码在ie7及以下ie版本会有问题,jquery无法通过#pending table tbody 找到正确的dom位置并append内容。需要修改,修改的代码如下
$("table tbody").empty().append(th).append(html);
把#pending去掉 直接通过table tbody找dom
3,我一时很疑惑,级联的选择器很常见,但是在ie7下为什么有这种问题,难道是jquery的bug或者div下嵌套table tbody的html写法不够标准?