title: How to remove div tag content?
body: <p>How can I remove the content of a div tag using JavaScript?</p>
  
  <p>I have tried some code, but it only removes the <code>level1</code> div (and of course all o it childern), but how can I remove only the content in <code>level3</code> inside?</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function destroyDiv() {
    var div = document.getElementById("level1");
    div.parentNode.removeChild(div);
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div id="level1"&gt;
  
    &lt;div id="level2"&gt;
  
      &lt;div id="level3"&gt;
        &lt;label&gt; Test content &lt;/label&gt;
      &lt;/div&gt;
  
    &lt;/div &lt;/div&gt;
  
    &lt;div id=blahDiv&gt;Remove me&lt;/div&gt;
    &lt;input type=button value='Remove the div' onclick='destroyDiv()'&gt;</code></pre>
  </div>
  </div>
  </p>