title: display current value of var to HTML
body: <p>I have a variable <code>speed</code>  controlled by the user from keyboard, and I want to display it current value all the time.<br>
  I tried:</p>
  
  <pre><code>var user_speed= 1; //init
  
  &lt;h3 style="float:left;" id="userspeed"&gt;&lt;/h3&gt;
  
  document.getElementById("userspeed").innerHTML = user_speed.toFixed(2);
  </code></pre>
  
  <p>but what I get is only <code>speed = 1</code> and it never changed.  </p>
  
  <p>Is there a way to keep changing the displayed value, without creating a function that fire each time the user change the speed and execute <code>document.getElementById()...</code> again?</p>