title: Add some text and an input box to a table cell through Javascript
body: <p>I'm trying to add a row with two columns to a pre-existing table in HTML. So far I have successfully done this. However, I would like to have both text and an input box in each cell. So far, this is the closest I've come:</p>
  
  <pre><code>newinputbox = document.createElement("input");
  newinputbox.setAttribute("type", "text");
  
  table = document.getElementById("input_table");
  row = table.insertRow(3);
  cell1 = row.insertCell(0);
  cell2 = row.insertCell(1);
  thetext = document.createTextNode("Text:");
  cell1.appendChild(thetext, newinputbox);
  </code></pre>
  
  <p>Unfortunately, this just returns the text. If I get rid of the <code>thetext</code> in the <code>cell1.appendChild(thetext, newinputbox)</code> statement, then it only returns the input box. </p>
  
  <p>Could someone please help me?</p>