title: document.getElementById() doesn't work?
body: <p>No much to say,</p>
  
  <pre><code>&lt;html&gt;
      &lt;body&gt;
          &lt;script&gt;
              var x = document.getElementById('btn1');
              alert(x);
          &lt;/script&gt;
              &lt;input type="button" id="btn1" value="Clickme" onclick="alert('1')" /&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>The alert message is <code>null</code> instead of a message contain details of the object or something like that.</p>
  
  <p>What is the problem?</p>