title: docment.forms["myForm"]["Element"].value command in js form validation
body: <p>I am making a simple Javascript  form validation and having trouble with accessing elements in the form. It seems that the command:</p>
  
  <pre><code>document.forms["myForm"]["un"].value;
  </code></pre>
  
  <p>works on Explorer but not on Firefox. The form I am working on is:</p>
  
  <pre><code> &lt;form name = "myForm" onsubmit="check()" method="POST"&gt;
              User Name:&lt;br&gt;&lt;input type="text" name = "un"&gt;&lt;br/&gt;
      Password:&lt;br&gt;&lt;input type="password" name = "pw"&gt;&lt;br/&gt;
      Confirm Password:&lt;br&gt;&lt;input type="password" name = "cpw"&gt;&lt;br/&gt;
              Email:&lt;br&gt;&lt;input type = "text" name = "em"&gt;&lt;br/&gt;
      &lt;input type = "submit" id = "sub" value="submit"&gt;
  </code></pre>
  
  <p>And let js validation be:</p>
  
  <pre><code>&lt;script type = "text/javascript"&gt;
  var user = document.forms["myForm"]["un"].value;
  alert(user);
  &lt;/script&gt;
  </code></pre>