title: JavaScript function for calculating is not working?
body: <p>this is my html input field </p>
  
  <pre><code>&lt;input type="number" id="t1"&gt;
  &lt;br /&gt; 
  &lt;button type="button" onclick="getvalue()"&gt;calculate&lt;/button&gt;
  &lt;br /&gt;
  &lt;div id="l1"&gt;change&lt;div&gt;
  </code></pre>
  
  <p>this is my script </p>
  
  <pre><code>&lt;script&gt;
  function getvalue() {
    var l = document.getElementById('l1');
    var c = document.getElementById('t1').value;
    var lc = c + 200;
    var tax =  2.1;
    var tot = lc * tax;
    l.innerHTML=tot;
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>and in text box i enter 10 so result is 441   this is the  calculation   10+200 = 210
  then 210*2.1 = 441    </p>
  
  <p>but in text box i enter 10 and click button i got 21420 </p>
  
  <p>the problem is  <code>var lc = c + 200;</code> this is not calculate correct here its work 10200 </p>
  
  <p>and i try this method also  <code>var x = 200;</code>   <code>var lc = c + x;</code> this is also i got 10200 how can i fix this? </p>