title: How can a user instantly change a div's width using Javascript?
body: <p>Here's how I thought I would kind of do it but this didn't work :</p>
  
  <pre><code>&lt;script type="text/Javascript"&gt;
    var input = document.getElementById('userinput'),
    width = document.getElementById('thing');
    input.onkeyup = function() {
    width.innerHTML = input.value}
  &lt;/script&gt;
  
  
  &lt;input id="userinput"&gt;
  &lt;div id="thing"&gt;You can decide the width of this div&gt;
  </code></pre>
  
  <p>And so the user would input something like 50% and the div would be 50% width.</p>
  
  <p>Thanks</p>