title: Cross browser keydown handling of carriage return?
body: <p>I'm looking for a cross browser solution to handling carriage return, to submit input from a text box.</p>
  
  <p>My current issue is firefox...</p>
  
  <p>javascript event is not defined</p>
  
  <pre><code>&lt;input id="myinput" type="text" onkeydown="press();" value="X"/&gt;
  
  &lt;script type="text/javascript"&gt;
  function press() {
      if (event.keyCode == 13) {
      // do something
      }
  }
  &lt;script&gt;
  </code></pre>
  
  <p>I can use jquery.</p>