title: Buttons to increment/decrement a value on screen
body: <p>I have something like this in an HTML file:</p>
  
  <pre><code>&lt;html&gt;
  
      &lt;body&gt;
  
      &lt;script type = text/javascript"&gt;
          var value = 0;
  
          add(x){
              x++;
              document.write(x);
          }
      &lt;/script&gt;
  
      &lt;form&gt;
          &lt;input type = "button" value = "Add one" onClick = "add(value)" &gt;
      &lt;/form&gt;
  
      &lt;body&gt; 
  
  &lt;/html&gt;    
  </code></pre>
  
  <p>When I run this and click the button, the page will just update and display only the new value. How can I change this so that it's just a real time update, and the "Add one" button remains on the screen?</p>
  
  <p>I think I need to have something like a "field" to display the value, and just get that field id, but I'm not sure if that's the right way of thinking.</p>