title: JavaScript summing of textboxes
body: <p>I could really your help! I need to sum a dynamic amount of textboxes but my JavaScript knowledge is way to week to accomplish this. Anyone could help me out? I want the function to print the sum in the p-tag named inptSum.</p>
  
  <p>Here's a function and the html code:</p>
  
  <pre><code>function InputSum() {
      ...
  }
  
  &lt;table id="tbl"&gt;
  &lt;tbody&gt;
      &lt;tr&gt;
          &lt;td align="right"&gt;
              &lt;span&gt;June&lt;/span&gt;
          &lt;/td&gt;
          &lt;td&gt;
              &lt;input name="month_0" type="text" value="0" id="month_0" onchange="InputSum()" /&gt;
          &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td align="right"&gt;
              &lt;span&gt;July&lt;/span&gt;
          &lt;/td&gt;
          &lt;td&gt;
              &lt;input name="month_1" type="text" value="0" id="month_1" onchange="InputSum()" /&gt;
          &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td align="right"&gt;
              &lt;span&gt;August&lt;/span&gt;
          &lt;/td&gt;
          &lt;td&gt;
              &lt;input name="month_2" type="text" value="0" id="month_2"  onchange="InputSum()" /&gt;
          &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td align="right"&gt;
              &lt;span&gt;September&lt;/span&gt;
          &lt;/td&gt;
          &lt;td&gt;
              &lt;input name="month_3" type="text" value="0" id="month_3" onchange="InputSum()" /&gt;
          &lt;/td&gt;
      &lt;/tr&gt;
      &lt;/tbody&gt;
  &lt;/table&gt;
  
  &lt;p id="inputSum"&gt;&lt;/p&gt;
  </code></pre>