title: Dynamically create div and into a static div
body: <p>On click of button I am trying to create one div and try to append static div into that and this is giving error.</p>
  
  <blockquote>
    <p>Uncaught TypeError: elm.appendChild is not a function.</p>
  </blockquote>
  
  <pre><code>function s()
  {
      var elm = '&lt;div' +
          'style="background-color:orange;height:125px;width:75px;"'+
          '&lt;/div&gt;';           
      var x=document.getElementById("staticDiv")          
      elm.appendChild(x);         
  }
  </code></pre>
  
  <p>HTML:</p>
  
  <pre><code>&lt;div id="staticDiv"&gt;
      &lt;ul&gt;
          &lt;li style="background-color:grey;"&gt;
              &lt;div&gt;"Mumbai"
              &lt;/div&gt;
          &lt;/li&gt;
      &lt;/ul&gt;
  &lt;/div&gt;    
  &lt;input type="button" value="ss" onclick="s()"/&gt;
  </code></pre>
  
  <p>I want to append static div into new div which is created dynamically.</p>