title: How to Create HTML table with fixed header but dynamic column
body: <p>I have two HTML buttons, one named 3days and other named week. Based on the click of any of these buttons I need to create a dynamic table with Fixed Headers but dynamic column. For example, suppose I clicked on 3days button,then the resultant table should be with 2 fixed headers and 3 dynamic column with 1,2,3 as name of the column. LIkewise if clicked on week button then HTML table should be with 2 fixed headers and 7 columns with column name as 1,2,3,4,5,6.</p>
  
  <p>I have a HTML table but how to create it dynamically using ajax and jQuery? I am not getting that.</p>
  
  <p>HTML table..</p>
  
  <pre><code> &lt;div id="table"&gt;
      &lt;table style="height:500px"&gt;
      &lt;thead&gt;
      &lt;tr&gt;
          &lt;th&gt;Column 2&lt;/th&gt;
          &lt;th&gt;Column 3&lt;/th&gt;
     &lt;/tr&gt;
   &lt;/thead&gt;
   &lt;tbody&gt;
      &lt;tr&gt;&lt;td&gt;Cell 1&lt;/td&gt;&lt;td&gt;Cell 2&lt;/td&gt;&lt;td&gt;Cell 3&lt;/td&gt;&lt;td&gt;Cell 4&lt;/td&gt;
   &lt;/tbody&gt;
   &lt;/table&gt;
   &lt;/div&gt;
  </code></pre>
  
  <p>Please help me to resolve this..</p>