$("ul").append($li1) I still don’t understand this sentence, please explain? -PHP Chinese website Q&A-$("ul").append($li1) I still don't understand this sentence. Can you please explain? -PHP Chinese website Q&A
Please watch and learn.
<script> $(function(){ var $li = $("<li>php中文网</li>"); $("ul").append($li1); }) </script>
首先我们创建了一个节点,赋值给$li
我们使用append这个方法,在选中的ul里面去添加$li 运行后,打开调试工具,在ul标签中会增加一个 "<li>php中文网</li>"
$("ul").append($li1) I still don’t understand this sentence, please explain? -PHP Chinese website Q&A-$("ul").append($li1) I still don't understand this sentence. Can you please explain? -PHP Chinese website Q&A
Please watch and learn.
首先我们创建了一个节点,赋值给$li
我们使用append这个方法,在选中的ul里面去添加$li 运行后,打开调试工具,在ul标签中会增加一个 "<li>php中文网</li>"