Append table to DIV - Javascript jQuery Method and Property

Javascript examples for jQuery Method and Property:append


Append table to DIV

Demo Code

ResultView the demo in separate window

  <script src="" type="text/javascript"></script> 
  <script type="text/javascript">
    function addTable()//from w w w  . java2s  . com
    $('#divResults').append('<table width="320" border="1"><tr><td colspan="2" rowspan="1">' + " wdw" + '</td></tr><tr><td width="118">' + "sxs" + '</td><td width="186">' + "xs" + '</td></tr></table>');
  <div id="divResults"> 
  <button onclick="addTable()">Add Stuff</button>  

Related Tutorials