title: Why isn't it checking for the correct value? (Javascript/HTML)
body: <p>Here is my code:</p>
  
  <pre><code>&lt;html&gt;
  &lt;body&gt;
  &lt;script type="text/javascript"&gt;
  function CheckPwd()
  {
   if(document.forms['frm'].pass.value == "magicisreal")
      {
        alert('Welcome, ADMIN...');
        return true;
      }
        return false;
  }
  &lt;/script&gt;
  
  Password:
  &lt;br&gt;
  &lt;input type="password" name="pass"&gt;
  &lt;br&gt;&lt;br&gt;
  &lt;input type="submit" value="Continue" onclick="return CheckPwd()"&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>It is supposed to return an alert when the value "magicisreal" is entered into the textbox. What, exactly, am I doing wrong that is not causing this result?</p>