title: How to get value from multiple different textbox through javascript
body: <pre><code>&lt;html&gt;
      &lt;head&gt;
      &lt;script&gt;
          function showUser()
          {
              for (var i = 0; i &lt; 10; i++)
              {
                  var internal = document.getElementById("inte[i]").value;   /* but its not working */
                  var external = document.getElementById("exte[i]").value;
              }
          }
      &lt;/script&gt;
      &lt;/head&gt;
      &lt;body&gt;
      &lt;?php 
          for (i = 0; i &lt; 10; i++)
          {
              echo "&lt;td&gt;&lt;input type='text' name='internal' id = 'inte[$i]' width='30'/&gt; &lt;/td&gt;";
              echo "&lt;td&gt;&lt;input type='text' name='external' id = 'exte[$i]' width='30'/&gt; &lt;/td&gt;";
          }
          echo "&lt;td&gt;&lt;input type='submit' name='submit1' value='Save Marks' width='30'  onclick = 'showUser()' /&gt;&lt;/td&gt;";
      ?&gt;
      &lt;/body&gt;
  &lt;html&gt;
  </code></pre>
  
  <p>i am using the above code but i cant get 10 values of different textboxes
  how to fetch these value through java script and i want to save it to database kindly help me </p>
  
  <p>i am using the above code but i cant get 10 values of different textboxes
  how to fetch these value through java script and i want to save it to database kindly help me </p>