title: How to get `form.field.value` in jQuery?
body: <p>in javascript i can validate a form on submit like below:-</p>
  
  <pre><code>&lt;form action="" method="post" onsubmit="return validate(this)"&gt;
      &lt;input type="text" name="uName" id="uName" /&gt;
      &lt;input type="password" name="passKey" id="passKey" /&gt;
      &lt;input type="submit" name="loginBtn" value="login" /&gt;
  &lt;/form&gt;
  
  &lt;script type="text/javascript"&gt;
  function validate(loginForm){
      if(loginForm.uName.value == ''){
          alert('Please Enter Username');
          loginForm.uName.focus();
      }else if(loginForm.passKey.value == ''){
          alert('Please Enter Password');
          loginForm.passKey.focus();
      }else {
          return true;
      }
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>I tried with below jQuery Code</p>
  
  <pre><code>&lt;form action="" method="post"&gt;
      &lt;input type="text" name="uName" id="uName" /&gt;
      &lt;input type="password" name="passKey" id="passKey" /&gt;
      &lt;input type="submit" name="loginBtn" value="login" /&gt;
  &lt;/form&gt;
  &lt;script type="text/javascript"&gt;
      $('form').submit(function(loginForm){
          if(loginForm.uName.val() == ''){
              alert('Please enter username');
              loginForm.uName.focus();
          }else if(loginForm.passKey.val() == ''){
              alert('Please enter username');
              loginForm.passKey.focus();
          }else {
              return true;
          }
  
          return false;
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>But not works me... please help me...!</p>