$("ul").append($li1)对这句还是没怎么明白,求解释?
check
check 2016-12-17 17:08:33
0
2
1259
check
check

reply all(2)
数据分析师

$("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>"

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!