日期:2014-05-16  浏览次数:20348 次

jquery validator 验证
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<script type="text/javascript" src="E:\jquery.validate.js"></script>
<script type="text/javascript" src="E:\jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="E:\jquery.metadata.js"></script>
<html>
 <head>
  
  <title> New Document </title>
  <meta name="Generator" content="EditPlus">
  <meta name="Author" content="">
  <meta name="Keywords" content="">
  <meta name="Description" content="">
 
 </head>
 <body>



    <p>

        <label for="firstname">Firstname</label>

        <input id="firstname" name="firstname" class="required" />

    </p>

 <p>

  <label for="email">E-Mail</label>

  <input id="email" name="email" class="required email" />

 </p>

 <p>

  <label for="password">Password</label>

  <input id="password" name="password" type="password" class="{required:true,minlength:5}" />

 </p>

 <p>

  <label for="confirm_password">确认密码</label>

  <input id="confirm_password" name="confirm_password" type="password" class="{required:true,minlength:5,equalTo:'#password'}" />

 </p>

    <p>

        <input class="submit" type="submit" value="Submit"/>

    </p>


 </body>
</html>
<script>
  
$(function() {

 $("#signupForm").validate();

});

</script>

jquery.validate.js老是报jquery未定义,另外validate()函数也不能用,关键我已经导入相关js文件,且路径也对的啊