title: reload a page onclick
body: <p>I have a simple log on page here: www.mrpbennett.com. I am looking to refresh the page so it removes my password and user name. I currently have the following:</p>
  
  <pre><code>&lt;button class="btn btn-signin" type="button" onclick="check(this.form)" value="login"&gt;login&lt;/button&gt;
  </code></pre>
  
  <pre class="lang-js prettyprint-override"><code>function check(form) { 
      if (form.userid.value == "admin" &amp;&amp; form.pswrd.value == "123qwe!!") {
          window.open('http://www.mrpbennett.com/mysite')
      }
      else {
          alert("Error Password or Username")
      }
  }
  </code></pre>
  
  <p>This is a super super simple bit of JS but is there anything I can do here to make the page refresh after I have clicked log on? Also is there a way to make the log on button work on pressing enter as well as clicking in?</p>