title: Enter data into text boxes, save them to html table
body: <p><a href="https://i.stack.imgur.com/Mbore.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Mbore.png" alt="This is design pagee"></a></p>
  
  <p>Here i want to enter data into the text boxes after clicking submit button, insert the textbox data into html table . In  table record must have edit button, after clicking edit button that particular record  get into the text boxes and update to the html table.
  here i have used inserCell()(new cell)I am not able to do after that. please replay</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function addrow()
  {
      var name = document.getElementById("txtbox1").value;
      var password = document.getElementById("txtbox2").value;
      var id = document.getElementById("txtbox3").value;
      var age = document.getElementById("txtbox4").value;
      var table = document.getElementById("mytable");
      var row = table.insertRow(1);
      var cell1 = row.insertCell(0);
      var cell2 = row.insertCell(1);
      var cell3 = row.insertCell(2);
      var cell4 = row.insertCell(3);
      var cell5 = row.insertCell(4);
      cell1.innerHTML = name;
      cell2.innerHTML = password;
      cell3.innerHTML = id;
      cell4.innerHTML = age;
      cell5.innerHTML = "new cell";
  }
  
  
  //html design page</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;head&gt;
     
      &lt;script type="text/javascript" src="JavaScript.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  
      &lt;table class="auto-style1"&gt;
          &lt;tr&gt;
              &lt;td&gt;NAME&lt;/td&gt;
              &lt;td&gt;&lt;input type="text" value="" id="txtbox1" /&gt;&lt;/td&gt;
              &lt;td&gt;&amp;nbsp;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;PASSWORD&lt;/td&gt;
              &lt;td&gt;&lt;input type="text" value="" id="txtbox2" /&gt;&lt;/td&gt;
              &lt;td&gt;&amp;nbsp;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;ID&lt;/td&gt;
              &lt;td&gt;&lt;input type="text" value="" id="txtbox3" /&gt;&lt;/td&gt;
              &lt;td&gt;&amp;nbsp;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;AGE&lt;/td&gt;
              &lt;td&gt;&lt;input type="text" value="" id="txtbox4" /&gt;&lt;/td&gt;
              &lt;td&gt;&amp;nbsp;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;input type="button" VALUE="SUBMIT" id="BTNSUBMIT" onclick="addrow()"/&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/table&gt;
      &lt;table id="mytable" border="1" &gt;
          &lt;tr&gt;
              &lt;th&gt;NAME&lt;/th&gt;
              &lt;th&gt;PASSWORD&lt;/th&gt;
              &lt;th&gt;ID&lt;/th&gt;
              &lt;th&gt;AGE&lt;/th&gt;
           
          &lt;/tr&gt;
  
      &lt;/table&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>