title: HTML - Two forms with 'enter' keypress to know which form I am entering
body: <p>I have two forms and I would like to make it easy to type in one form text field and press enter and the page knows what form is being filled out.</p>
  
  <p>Form 1 (example: search):</p>
  
  <pre><code>&lt;form action="" method="post" name="form1"&gt;
  &lt;input type="text" name="txt1" /&gt;
  &lt;input type="submit" value="Enter 1" /&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>Form 2 (example: login):</p>
  
  <pre><code>&lt;form action="" method="post" name="form2"&gt;
  &lt;input type="text" name="txt2" /&gt;
  &lt;input type="submit" value="Enter 2" /&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>Both passes through a PHP script to validate and off to its correct site.
  Search is added to a page that is included in every page (MVC) header and the login is on its own page but both come together in one page as two forms.  When logging in on the login page I enter username and password and press enter but it defaults to the search submit button and would like to know its being entered on the login submit button.</p>
  
  <p>Appreciate your help...</p>