How to append checkbox,textnode,in List item
<p>I want to create a list with check box dynamically. For that i created list item, check box,text node dynamically.</p>

<p>My problem is, I want to append checkbox and textnode inside List item. How to do this?</p>

<p><strong>In Script:</strong></p>

<pre><code>    var name=x[i].getElementsByTagName("name")[0].childNodes[0].nodeValue;
 var list = document.createElement( "li" );
 var cb = document.createElement( "input" );
 cb.type = "checkbox";
 cb.id = "c1";
 cb.value = name;
 cb.checked = false;
 var text = document.createTextNode( name );
</code></pre>

<p><strong>In Body:</strong></p>

<pre><code>&lt;ul id="list" &gt;
    &lt;/ul&gt;
</code></pre>

<p>I want to do like, </p>

<pre><code>&lt;li&gt;&lt;input type="checkbox"&gt;Tamil&lt;/li&gt;  
</code></pre>

<p>dynamically from javascript.</p>

<p>For that i tried like, </p>

<pre><code>document.getElementById( 'list' ).appendChild(list);
document.getElementById( 'list' ).appendChild(cb);
document.getElementById( 'list' ).appendChild(text);
</code></pre>

<p>But it is not appended in <code>li</code>.</p>

<p>How to append these correctly?</p>
