javascript appenchild
<pre><code>         for(var i=0; i&lt;myJSONObject.model.length; i++){
         var create_div = document.createElement('div');
         create_div.id = 'model_id'+i;
         create_div.innerHTML = myJSONObject.model[i].model_name;
         var assign_innerHTML = create_div.innerHTML;
         var create_anchor = document.createElement('a');
         document.getElementById('models').appendChild(create_div);
         document.getElementById(create_div.id).appendChild(create_anchor);
     }
</code></pre>

<p>for ex the myJSONObject.model.length is 2 </p>

<p>the output is like this </p>

<pre><code>&lt;div id = 'model_id0'&gt;XXXXX&lt;a&gt; &lt;/a&gt;&lt;/div&gt;
            &lt;div id = 'model_id1'&gt;XXXXX&lt;a&gt; &lt;/a&gt;&lt;/div&gt; */
</code></pre>

<p>but instead of above the output sholud be like this</p>

<pre><code>&lt;div id = model_id0&gt; &lt;a&gt; xxxxxx&lt;/a&gt;&lt;/div&gt; 
&lt;div id = model_id1&gt; &lt;a&gt; xxxxxx&lt;/a&gt;&lt;/div&gt; 
</code></pre>

<p>how to append it inside of the innerhtml
any one plz reply !!!!</p>
