jquery表单验证插件validation使用方法详解

一、如何使用

引入js文件

rush:xhtml;">

编写html页面,这里仅以用户名、密码为例

rush:xhtml;">
用户登录

编写script脚

rush:js;"> $(document).ready(function(){ $("#demoForm").validate({ rules:{ username:{ required:true,// 是否必填 minlength:2,// 最小长度 maxlength:10 // 最大长度 },password:{ required:true,minlength:2,maxlength:16 } } }); });

二、测试

如果大家还想深入学习,可以点击两个精彩的专题:

以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持编程之家。

相关文章

页面搜索关键词突出 // 页面搜索关键词突出 $(function () {...
jQuery实时显示日期、时间 html: <span id=&quot...
jQuery 添加水印 <script src="../../../.....
中文:Sys.WebForms.PageRequestManagerParserErrorExceptio...
1. 用Response.Write方法 代码如下: Response.Write(&q...
Jquery实现按钮点击遮罩加载,处理完后恢复 思路: 1.点击按...