title: Send enter from javascript
body: <p><em><strong>How to send enter from javascript to site?</em></strong></p>
  
  <p>What I real need is to send text to site like filehippo.com in search box, and press enter to search for those text.<br>
  So piece of code from site is:</p>
  
  <pre><code>&lt;div id="searchbox"&gt;
  &lt;form name="f" action="/search"&gt;
  &lt;input style="color: #999" type="text" id="q" name="q" maxlength="150" value="Search..." onfocus="javascript:clearInputValue('q', 'Search...')" onblur="javascript:setDefaultIfEmpty('q', 'Search...')"&gt;
  &lt;input type="submit" id="search-submit" value="GO" onclick="javascript:submitQuery('q', 'Search...')"&gt;
  &lt;/form&gt;&lt;/div&gt;
  </code></pre>
  
  <p>And my simple code look like this:</p>
  
  <pre><code>javascript: document.getElementById('q').focus();document.getElementById('q').value='Winrar';document.getElementById('f').item(0).click();
  </code></pre>
  
  <p>And those script just put focus on search box and send text to them, but I need also to do automatically search (send enter), how to do that?</p>
  
  <pre><code>document.getElementById('f').item(0).click(); -&gt; dont work
  </code></pre>
  
  <p>What I need is to simulate click of mouse, by enter, cause can't send click to element that work properly.</p>
  
  <p>Is it possible to send enter with text?</p>