html部分:
jQuery部分:
var str=$("#mo").html();
console.log(str);
console.log的结果:
为什么不能获取tr标签,怎样才能获取?
而且很奇怪的,我用after()方法的里,拼接
Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
td要写在tr里,tr要写在table里,恩!<p id="mo">
</p>
以上是你给的html代码 之中 并没有<tr>标签 那你怎么能获取呢?
我个人认为 .after()在这里不适用 如果要套在td外层 达到这样的效果
<p>
</p>
应该使用wrapAll()方法
您好,没有table标签的话,确实是获取不出来的。请问您之后是怎么处理的?