title: Call a function when the enter button is pressed via Javascript
body: <p>I have a problem, I want to call a function inside a textbox, when I press enter, this is my code</p>
  
  <pre><code>&lt;input  type="text" value="DIGITE O LOCAL" onclick="this.select()" size="20" id="endereco"&gt;
  </code></pre>
  
  <p>I want to put something like <code>onenterpress="doSomething()"</code></p>
  
  <p>How can I do this ?</p>