title: Dynamically How to append more rows with columns into table using javascript
body: <p>I want to append 3 rows into table with 3 column.I tried the following code,but it's not working.</p>
  
  <p>html Code:</p>
  
  <pre><code>  &lt;table width="50%" border="0" cellspacing="2" cellpadding="5" class="height"&gt;
      &lt;/table&gt;    
  </code></pre>
  
  <p>javascriptcode:</p>
  
  <pre><code>  var table=document.getElementsByClassName('height') ;
    //creating inputfield with attribute
    var newField=document.createElement('input');
    newField.setAttribute('type','text');
    //creating &lt;td&gt; 
    var newTd=document.createElement('td');
    //appending newField into td
    newTd.appendChild(newField);
    //creating &lt;tr&gt; element
    var newTr=document.createElement('tr');
    //appending 3 &lt;td&gt;(newTd) elements,but here 3 &lt;td&gt;'s are not appending
    newTr.appendChild(newTd);
    newTr.appendChild(newTd);
    newTr.appendChild(newTd);
    //the above code was not working,if it works I want to append 3 &lt;tr&gt; into &lt;table&gt;.
  </code></pre>
  
  <p>I don't want to use external libraries(jquery,....) .</p>
  
  <p>thanks</p>