title: How to multiply two values without clicking a button - javascript
body: <p>Here is my fiddle</p>
  
  <p><a href="http://jsfiddle.net/YFgkB/6/" rel="nofollow">http://jsfiddle.net/YFgkB/6/</a></p>
  
  <pre><code> &lt;input type="text" name="input1" id="input1" value="5"&gt;
   &lt;input type="text" name="input2" id="input2" value=""&gt;
   &lt;a href="javascript: void(0)" onClick="calc()"&gt;Calculate&lt;/a&gt;
   &lt;input type="text" name="output" id="output" value=""&gt;
  </code></pre>
  
  <p>Javascript</p>
  
  <pre><code> function calc(){
     var textValue1 = document.getElementById('input1').value;
     var textValue2 = document.getElementById('input2').value;
  
     document.getElementById('output').value = textValue1 * textValue2; 
   }
  </code></pre>
  
  <p>Here everything working fine when click on calculate link, it multiplies both the text input numbers and shows the result in the third box but I need it to automatic multiplication with the link calculate. </p>
  
  <p>I mean user can enter a value in the 2nd text box so it automatically multplies and shows the result in the 3rd textbox without any button.</p>