title: How to trigger HTML button when you press Enter in textbox?
body: <p>So the code that I have so far is:</p>
  
  <pre><code>&lt;fieldset id="LinkList"&gt;
      &lt;input type="text" id="addLinks" name="addLinks" value="http://"&gt;
      &lt;input type="button" id="linkadd" name="linkadd" value="add"&gt;
  &lt;/fieldset&gt;
  </code></pre>
  
  <p>It is not in a <code>&lt;form&gt;</code> and is just as it is within a <code>&lt;div&gt;</code>.  However when I type something into the <code>textbox</code> called "addLinks" I want the user to be able to press Enter and trigger the "linkadd" <code>button</code> which will then run a JavaScript function.<br />
  How can I do this?<br />
  Thanks</p>
  
  <p><strong>Edit:</strong>
  I did find this code, but it doesnt seem to work.</p>
  
  <pre><code>$("#addLinks").keyup(function(event){
      if(event.keyCode == 13){
          $("#linkadd").click();
      }
  });
  </code></pre>