以下是我在動態添加LI的小提琴。我面臨的問題是,我試圖添加Lis
的Parent UL
已經包含Parent LI
中的子0123'以及動態生成新的Li。李氏不僅爲父母UL而且爲兒童UL創造了條件。請讓我知道我可以改變以下小提琴這樣的(動態創建)李將只Parent <ul>
只追加父母UL
$("#butadd").click(function() {
$("ul").append("<li>Folder Name : <input type='text' class='fname' value='' required='required' /> <input type='button' class='liDelete' value='- Remove' /> <ul class='anotherUL'><li>Dynamic Child Li</li></ul> </li>");
});