title: How to limit enter key press to only one button in a form having two submit buttons
body: <p>I have an HTML <code>form</code> having two submit type input buttons with different actions attached. The form should get submitted on click of any of these buttons. But on <strong>enter key press</strong>, <strong>button-B</strong> should trigger the submit. Now as i have <strong>button-A</strong> on top of <strong>button-B</strong> in the order, <strong>button-A</strong> is getting triggered on enter press.</p>
  
  <p>Please note that changing the order of buttons is not possible in my case.</p>
  
  <p>My code goes like this,</p>
  
  <pre><code>&lt;form method="POST" action="someAction"&gt;
    &lt;input type="text" name="fName"/&gt;
    &lt;input type="text" name="lName"/&gt;
    &lt;input type="submit" value="Action-A" name="button-A"/&gt;
    &lt;input type="submit" value="Action-B" name="button-B"/&gt;
  &lt;/form&gt;
  </code></pre>