title: Automatically getting percentage based on two input fields in javascript
body: <p>I am new to Java.can anyone tell how to calculate percentage of two input numbers.Will I have to write some javascript? Can anyone suggest?</p>
  
  <p>Here is my code</p>
  
  <pre><code>&lt;td class="bg1" style="width:22%;"&gt;&lt;input type="text" style="width:40px;" name="score2"  align="center" maxlength="4" onblur="validateField('DIGIT1',this)" /&gt;/&lt;input type="text" style="width:40px;" name="totmarks2"  align="center" maxlength="4" onblur="validateField('DIGIT1',this)"/&gt;&lt;/td&gt;
  &lt;td class="bg2" width="15%;"&gt;&lt;input type="text"  name="percentage2"  maxlength="5" /&gt;&lt;/td&gt;
  </code></pre>