title: HTML form run javascript on enter?
body: <p>I am building a newtab page here:</p>
  
  <p><a href="http://codepen.io/Thisisntme/full/VvgeyV" rel="nofollow">http://codepen.io/Thisisntme/full/VvgeyV</a></p>
  
  <p>This page consists of a pretty design thing, and a google search bar. However, when I press enter, rather than searching google it opens the same window with <code>http://codepen.io/Thisisntme/full/VvgeyV?inputbox=TEST_INPUT</code>  ("TEST_INPUT" being whatever was typed into the box).</p>
  
  <p>When I press the submit button off to the left, It actually searches.</p>
  
  <p>How can I make this search when the enter key is pressed?</p>
  
  <p>Here is the code important to the form.</p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;form NAME="myform"&gt;
    &lt;div id = "textbox"&gt;
     &lt;INPUT type="text" name="inputbox" value="" placeholder="Search with me!"&gt;
    &lt;/div&gt;
     &lt;input type="button" name="button" value="Click" onClick="google(this.form)"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>CSS:</p>
  
  <pre><code>#backgroundstuff canvas {
     outline: 0px;
     position: fixed;
     left: 0px;
     top: 0px;
     /*width: auto;
     height: 100%;*/
  
     z-index: -99;
  }
  </code></pre>
  
  <p>Javascript</p>
  
  <pre><code>function google(form) {
     var gSearch = form.inputbox.value;
     window.location.href = 'https://www.google.com/search?q=' + gSearch;
     //window.location.replace('https://www.google.com/search?q=' + gSearch);
  }
  </code></pre>