<div id="everything">
<ol>
<li>Here is thing one.</li>
<li>Here is thing two.</li>
<li>Here is thing three.</li>
</ol>
我想将一个额外的li附加到ol列表中,如何使用append()来实现呢?
编辑:我发现我的问题是我没有用标签包装append()。
我想追加一个新的列表项,上面写着“ is thing four”。我该如何使用append()来完成该操作呢?
发布于 2018-07-26 03:42:06
在其基本形式中,.append()函数将为您提供帮助(就像快速谷歌搜索一样)。
$( "ol" ).append( "<li>Here is thing four.</li>" );
https://stackoverflow.com/questions/51526511
复制相似问题