Maizi93
2016-10-17 17:11
<!DOCTYPE <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>登录界面-jQuery validation 插件</title> <link rel="stylesheet" type="text/css" href="E:\WEB\CSS\login.css"> </head> <body> <form id="demoForm"> <fieldset> <legend>用户登录</legend> <p> <label for="username">用户名</label> <input type="text" id="username" name="username"/> </p> <p> <label for="password">密码</label> <input type="password" id="password" name="password"/> </p> <p> <input type="submit" value="登录"/> </p> </fieldset> </form> <script src="E:\WEB\Scripts\jquery.js"></script> <script src="E:\WEB\Scripts\jquery-validation-1.15.0\dist\jquery.validate.js"></script> <script> $(document).ready(function(){ $("#demoForm").validate({ rules:{ username:{ required:true, minlength:2, maxlength:10 }, password{ required:true, minlength:2, maxlength:16 } } }); }); </script> </body> </html>
为什么我这个无法显示插件的效果?求大神看过来
password后面没加:
没有放到表单里吧
jQuery插件——Validation Plugin
65871 学习 · 216 问题
相似问题