What is the difference between document.getElementById('mybox') and mybox?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/4321839/document-getelementbyidsomeid-vs-someid">document.getElementById(&ldquo;someId&rdquo;) Vs. someId</a>  </p>
</blockquote>



<p>For example I have an element with <code>id="mybox"</code> attribute, is there any difference between calling it with <code>document.getElementById('mybox')</code> and <code>mybox</code> directly, as I see both work same in most browsers? The jsfiddle shows <strong>live example</strong> <a href="http://jsfiddle.net/usmanhalalit/TmS3k/" rel="nofollow">http://jsfiddle.net/usmanhalalit/TmS3k/</a> </p>

<p>If there is no difference then why <code>document.getElementById('mybox')</code> is so popular, is it a bad practice to call <code>mybox</code> directly?</p>
