javascript - How to populate ul from external html using append -
i'd populate existing list unordered list has 10+ li's. i'd populate js or jquery html file containing li's
or
i'd populate ul li's commented html.
<div class="lcatnav categorynavigation"> function write_list_item(){ var items = document.getelemntbyid("lcatnav categorynavigation");
is possible?
so far i'm trying append ul using function element id (the ul) append said ul bunch of variables. isn't working well!
using html dom can list name using
document.getelementbyid("mylist");
you can set variable equal element or work directly using appendchild() method.
document.getelementbyid("mylist").appendchild(newlistitem);
or
var list = document.getelementbyid("mylist"); (var = 0; < elements.length; i++) list.appendchild(elements[i]);
Comments
Post a Comment