title: How to remove an HTML element using Javascript?
body: <p>I am a total newbie. Can somebody tell me how to remove an HTML element using the original Javascript not jQuery.</p>
  
  <p><b><code>index.html</code></b></p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
   &lt;script type="text/javascript" src="myscripts.js" &gt; &lt;/script&gt;
   &lt;style&gt;
   #dummy {
    min-width: 200px;
    min-height: 200px;
    max-width: 200px;
    max-height: 200px;
    background-color: #fff000;
   }
   &lt;/style&gt;
  &lt;/head&gt;
  &lt;body&gt;
   &lt;div id="dummy"&gt;&lt;/div&gt;
  
   &lt;form&gt;
    &lt;input type="submit" value="Remove DUMMY" onclick="removeDummy(); "/&gt;
   &lt;/form&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p></p>
  
  <p><b><code>myscripts.js</code></b></p>
  
  <pre><code>function removeDummy() {
   var elem = document.getElementById('dummy');
   elem.parentNode.removeChild(elem);
  }
  </code></pre>
  
  <p>What happens when I click the submit button, is that it will disappear for a very very short time and then appear back immediately. I want to completely remove the element when I click the button.</p>