title: How Can I Prevent the Enter keypress from Triggering a Button Click?
body: <p>I have the following code snippet.</p>
  
  <pre><code>  $("#days").keypress(function(e){
        if(e.keyCode == 13){
           self.validateNightModalForm();
        }
    });
  </code></pre>
  
  <p>basically, it checks for enter then invoke a function.</p>
  
  <p>My only problem is that IE8 also clicks a button. When I hit enter. I've checked it with all other browsers, but only IE8 does this. </p>
  
  <p>Is there any way to prevent it?</p>