title: Reset DOM Table on Form Submit
body: <p>I have the following code in my HTML file:</p>
  <pre><code>&lt;form class=&quot;search-form&quot;&gt;
      &lt;label for=&quot;company&quot;&gt;Company&lt;/label&gt;
      &lt;input type=&quot;text&quot; id=&quot;company&quot; name=&quot;company&quot; required /&gt;
      &lt;label for=&quot;from&quot;&gt;From&lt;/label&gt;
      &lt;input type=&quot;date&quot; id=&quot;from&quot; name=&quot;from&quot; required /&gt;
      &lt;label for=&quot;from&quot;&gt;To&lt;/label&gt;
      &lt;input type=&quot;date&quot; id=&quot;to&quot; name=&quot;to&quot; required /&gt;
      &lt;button&gt;Search&lt;/button&gt;
    &lt;/form&gt;
    &lt;hr /&gt;
    &lt;h1&gt;Search Result:&lt;/h1&gt;
  
    &lt;table class=&quot;content-table&quot; id=&quot;dataTable&quot;&gt;
      &lt;!-- here goes our data! --&gt;
    &lt;/table&gt;
  </code></pre>
  <p>I am making a request to server on from submit. I receive JSON response and I have a JS code to present it as a table in DOM. Every time I search for data the old data still lives in the DOM. I want to clear the table entirely and fill with new data on search. How can I do that? No JQUERY please. Thank you in Advance.</p>