title: Submitting a form by pressing enter without a submit button
body: <p>Well I am trying to submit a form by pressing enter but not displaying a submit button. I don't want to get into JavaScript if possible since I want everything to work on all browsers (the only JS way I know is with events).</p>
  
  <p>Right now the form looks like this:</p>
  
  <pre><code>&lt;form name="loginBox" target="#here" method="post"&gt;
      &lt;input name="username" type="text" /&gt;&lt;br /&gt;
      &lt;input name="password" type="password" /&gt;
      &lt;input type="submit" style="height: 0px; width: 0px; border: none; padding: 0px;" hidefocus="true" /&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>Which works pretty well. The submit button works when the user presses enter, and the button doesn't show in Firefox, IE, Safari, Opera and Chrome. However, I still don't like the solution since it is hard to know whether it will work on all platforms with all browsers.</p>
  
  <p>Can anyone suggest a better method? Or is this about as good as it gets?</p>