天道酬勤,学无止境

jquery.validate

jquery.validate验证text,checkbox,radio,selected

jquery.validate是jquery的一个插件,用来辅助开发者在客户端方便快捷的实现表单验证,最终达到提高用户体验的目的。官网:http://plugins.jquery.com/validate/示例代码index.cshtml<form id="formLogin" method="post"> <div> <label for="username">Username:</label> <input type="text" id="username" name="username" /> </div> <div> <label for="password">password:</label> <input type="text" id="password" name="password" /> </div> <div> <label for="password1">password1:</label> <input type="text" id="password1" name="password1" /> </div> <div> <label for="sex">sex:</label> <select id="sex" name="sex"> <option id="sexopt" value="" selected="selected">请选择</option>

2021-05-11 16:48:14    分类:博客    正则表达式   jquery.validate   juery   javascript