title: Take All Html Table Data And Show in alert through loop javascript
body: <p>i Want to add loop to read all html table rows data which are "Input text" and want to show all the "Input text" data according to row  as alert by click  once on submit this code is only working for one table row data which
  is generated 
  <div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function myFunction() {
      var table = document.getElementById("myTable");
      var row = table.insertRow(0);
      var cell1 = row.insertCell(0);
      var cell2 = row.insertCell(1);
      var cell3 = row.insertCell(2);
      var cell4 = row.insertCell(3);
      var textf1  = '&lt;input type="text" value="Fname1" id="text1" /&gt;';
      var textf2  = '&lt;input type="text" value="Fname2" id="text2" /&gt; ';
      cell1.innerHTML = textf1;
      cell2.innerHTML = textf2;
      cell3.innerHTML = textf4;
  }
  
  
  function first(){
  
      }
      alert("Hello"+text1.value+"Your Surname Is "+text2.value+" You Have Chosen");
      return myFunction()
      }
  
  &lt;</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;p&gt;Click the button to add a new row at the first position of the table and then add cells and content.&lt;/p&gt;
  
  &lt;table id="myTable"&gt;&lt;/table&gt;
  &lt;table id="myTable1"&gt;&lt;/table&gt;
  &lt;br&gt;
  &lt;div id="first"&gt;&lt;/div&gt;
  &lt;button onclick="myFunction()"&gt;Add Your First row&lt;/button&gt;
  &lt;button onclick="Submit()"&gt;Submit&lt;/button&gt;</code></pre>
  </div>
  </div>
  </p>