title: Disable form submission via Enter key on only _some fields
body: <p>I want to retain the conventional 'form submits when i press Enter' behavior because users are familiar with. But by reflex, they often hit enter when they finish with a text input box - but before they are actually done with the complete form. </p>
  
  <p>I'd like to hijack the Enter key only when then focus is on a certain class of input.</p>
  
  <p>Looking  <a href="https://stackoverflow.com/questions/911071/javascriptblock-form-submit-on-enter-key-press">Related Questions</a> this looks like what I'm looking for:</p>
  
  <pre><code>if (document.addEventListener) {
      document.getElementById('strip').addEventListener('keypress',HandleKeyPress,false);
  } else {
      document.getElementById('strip').onkeypress = HandleKeyPress;
  }
  </code></pre>
  
  <p>but the <code>if (document.addEventListener) {</code> part is unfamiliar to me.</p>