 <p>Supposing you have an <code>&lt;input&gt;</code> with <code>id="myInput"</code>, you can use following javascript:</p> <pre><code>document.getElementById("myInput").value="0"+parseFloat(document.getElementById("myInput").value)+1; </code></pre>