title: JavaScript - redirect to other page if password is incorrect
body: <p>What I want is use another script replace the "alert('That Is Correct!')" which can make it directly open the webpage rather then come up with alert first.</p>
  
  <pre><code>if (password === pass1)
      alert('That Is Correct!');
  else
      window.location="SITE-LINK";
  &lt;/script&gt;
  </code></pre>
  
  <p>Note: this script is for when open a page come up with asking password, I just want when the password is right it will continue opening the page, rather than alert message or open a certain page. Because this script is for a template, so it will open many different address. </p>