jQuery表单验证插件 Validation for Bootstrap
- 授权协议: Apache
- 开发语言: JavaScript
- 操作系统: 跨平台
- 软件首页: http://fatesheep.github.com/Validation-for-Bootstrap/
- 软件文档: http://fatesheep.github.com/Validation-for-Bootstrap/
- 官方下载: https://github.com/FateSheep/Validation-for-Bootstrap
软件介绍
首先需要引入 jQuery 和 Bootstrap 库,然后在Js代码中加入下面一行代码。
$('#form').validation();
$('#form') 为jQuery选中你需要验证的 dom 元素,最后只需要在html代码中指定相关的属性即可。
<form class="form-horizontal">
<div class="control-group">
<label class="control-label" for="inputEmail">邮箱</label>
<div class="controls">
<input type="text" id="inputEmail" check-type="mail" mail-message="邮箱格式不正确!" >
</div>
</div>
<div class="control-group">
<label class="control-label" for="inputPassword">密码</label>
<div class="controls">
<input type="password" id="inputPassword" check-type="required" required-message="密码不能为空!" >
</div>
</div>
<div class="control-group">
<div class="controls">
<button type="submit" class="btn">登录</button>
</div>
</div>
</form>
其中 check-type 为需要验证的规则,可以绑定多个规则,之间用空格隔开。
其中 required-message 为验证为通过显示的信息,在这里 required-message 的'-'之前为前面定义的验证规则名称。
Coding the Matrix
Philip N. Klein / Newtonian Press / 2013-7-26 / $35.00
An engaging introduction to vectors and matrices and the algorithms that operate on them, intended for the student who knows how to program. Mathematical concepts and computational problems are motiva......一起来看看 《Coding the Matrix》 这本书的介绍吧!
