title: Can't modify innerHTML of a div
body: <p>I'm trying to modify the innerHTML of a particular <code>div</code>, but I cannot get to erase the content of that <code>div</code>. I have the following code:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
      &lt;head&gt;
          &lt;title&gt;Test&lt;/title&gt;
          &lt;meta http-equiv="content-type" content="text/html; charset=UTF-8"&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;script type="text/javascript"&gt;
              function reset() {
                  document.getElementById("results").innerHTML = "";
              }
              function check () {
                  document.getElementById("results").innerHTML = "foo";
              }
          &lt;/script&gt;
          &lt;form name="form1"&gt;
              &lt;input type="button" value="Check" onclick="check();"&gt;
              &lt;input type="button" value="Reset" onclick="reset();"&gt;
          &lt;/form&gt;
          &lt;div id="results"&gt;&lt;/div&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Can anyone point out where I'm doing it wrong?</p>
  
  <p>Thanks in advance.</p>