title: How to set id attribute to table?
body: <p>I want to create a table with my id to my table with javascript, I am using <code>setAttribute</code> but it is not work, could you please help me? </p>
  
  <pre><code>var table = $('&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Name&lt;/th&gt;&lt;th&gt;Age&lt;/th&gt;&lt;th&gt;Position&lt;/th&gt;&lt;th&gt;Note&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;/tbody&gt;&lt;/table&gt;').addClass('table table-bordered table-hover search-table table-striped');
  table.setAttribute("id", "myid");
  $('#content').html(table);
  </code></pre>