I have this html form, which does not actually sends data to a php file, buts sends data to a javascipt function.
Works fine if I click the button, but when I hit enter nothing happens.
I would like the button to work if clicked on with the mouse or the user hits enter.
How do I fix this? Thanks
       <input type="button" value="Reveal Now" style="margin: 3px;font-family: 'festivo_lcbasic', Arial, Helvetica, sans-serif; text-transform:uppercase; font-size:26px; text-decoration:none; font-weight:normal; padding-top: 10px;"  onclick="check(this.form.Pass.value)"  onkeypress="check(this.form.Pass.value)"/>
  </form>
  <script type="text/javascript">
  var password = ["#123, #345"];
  function check(pass) {
    for(a = 0; a < password.length; a++) {
      if (pass == password[a]) {
        top.location.href="enter.html";
        return;
      }
    }
    location.href="incorrect.html";
  }
  </script>
 
     
    