title: How to use the addChild method of javascript to add a node to my div?
body: <p>Hello I have a div as follows</p>
  
  <pre><code>&lt;div id="test" class="test2"&gt;
  &lt;p&gt; &lt;a href=""&gt; &lt;a&gt; &lt;/p&gt;
  &lt;p&gt; &lt;a href=""&gt; &lt;a&gt; &lt;/p&gt;
  &lt;p&gt; &lt;a href=""&gt; &lt;a&gt; &lt;/p&gt;
  &lt;p&gt; &lt;a href=""&gt; &lt;a&gt; &lt;/p&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>(I have stripped out the data but that is the structure)</p>
  
  <p>How does one use the addChild function of javascript to add a new node </p>
  
  <pre><code>&lt;p&gt; &lt;a href=""&gt; &lt;a&gt; &lt;/p&gt;
  </code></pre>
  
  <p>I know how to use the removeChild function but I haven't been able to find documentation and examples using the addChild function.</p>
  
  <p>If I have the node string in a php array, and can execute the php script containing the array with a GET call via a button click how can I use the addChild function to put the node string into the div?</p>