title: javascript remove li without removing ul?
body: <p>Is there any way to remove the li elements of a ul without also removing the ul? I can only seem to find this.</p>
  
  <pre><code>var element = document.getElementById('myList');
  element.parentNode.removeChild(element);
  </code></pre>
  
  <p>But, this removes the ul. I'm hoping to be able to remove and append li elements on the fly without also having to createElement the ul every time I remove li elements. Just looking for a simpler way. Thanks for any help.</p>
  
  <pre><code>&lt;div id="listView"&gt;
    &lt;ul id="myList" class="myList-class"&gt;
      &lt;li&gt;item 1&lt;/li&gt;
      &lt;li&gt;item 2&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/div&gt;
  </code></pre>