title: How to set auto 2 decimal number using value from id input type="text" javascript?
body: <p>How to set auto 2 decimal number using value from id input <code>type="text"</code> javascript ?</p>
  
  <p><a href="http://jsfiddle.net/A4wxX/90/" rel="nofollow">http://jsfiddle.net/A4wxX/90/</a></p>
  
  <p>First , fill data eg: <code>2</code> into input , it's will update input to <code>2.00</code></p>
  
  <p>But not work When i user this </p>
  
  <pre><code>var numb = document.getElementById("int").value;
  </code></pre>
  
  <p>How can i do ? thank.</p>
  
  <pre><code>&lt;script type="text/javascript" src="http://code.jquery.com/jquery-1.8.3.js"&gt;&lt;/script&gt;
  
  &lt;script type="text/javascript"&gt;
  
  function fn_do() {
      var numb = document.getElementById("int").value;               
      //var numb = 123;
      var zzz = numb.toFixed(2);   
      document.getElementById("int").value = zzz;
  }    
  &lt;/script&gt;
  
  &lt;input type="text" id="int" onchange="fn_do()"&gt;
  </code></pre>