title: How can I set the focus automatically on a field in div?
body: <p>I have a div where I input a search query:</p>
  
  <pre><code>&lt;div id="search"&gt;
    &lt;form method="get" action="http://www.bing.com/search"&gt;
     &lt;input type="text"   name="q" size="31" maxlength="255" value="" /&gt;
     &lt;input type="submit" value="Search" /&gt;
    &lt;/form&gt;
   &lt;/div&gt;
  </code></pre>
  
  <p>How can I set the focus automatically when the page loads?</p>