title: Show a javascript variable on html textbox
body: <p>All I have to do is to show a number in a textbox and a button which add 10 every time I press it, here's my code (it doesn't work).</p>
  
  <pre><code>&lt;head&gt;
      &lt;script type="text/javascript"&gt;
      var n=parseInt(ocument.forms["formNum"]["numero"].value);
      document.getElementById("numero").value=n;
  
      function sumar() {
          n=document.forms["formNum"]["numero"].value+10;
          document.forms["formNum"]["numero"].value=n;
      }
  
      function inicializar() {
          n=document.forms["formNum"]["numero"].value=0;
      }
      &lt;/script&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
      &lt;form name="formNum"&gt;
          &lt;p&gt;
              &lt;input type="text" size="10" name="numero" id="numero" /&gt;
          &lt;/p&gt;
  
          &lt;p&gt;
              &lt;input type="button" name="sumar" value="Sumar" onclick="sumar()" /&gt;
              &lt;input type="button" name="inicializar" value="Iniciar a 0" onclick="inicializar()" /&gt;
          &lt;/p&gt;
      &lt;/form&gt;
  &lt;/body&gt;
  </code></pre>