1 Star 0 Fork 13

简简单单/jshow for bootstrap

forked from david/jshow for bootstrap 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
formValidate.ahtml 2.67 KB
一键复制 编辑 原始数据 按行查看 历史
david 提交于 2013-09-16 00:24 . 修改验证器和简介
<div class="modal-body auto-height-body">
<form class="form-horizontal" id="form1">
<div class="control-group">
<label class="control-label" for="enname">字典选项值</label>
<div class="controls">
<input type="text" name="dictElement.enname" id="enname" placeholder="请输入字典选项值" maxlength="20"/>
</div>
</div>
<div class="control-group">
<label class="control-label" for="cnname">选项显示值</label>
<div class="controls">
<input type="text" name="dictElement.cnname" id="cnname" placeholder="请输入选项显示值" maxlength="100"/>
</div>
</div>
<div class="control-group">
<label class="control-label" for="dictName">字典标示</label>
<div class="controls">
<input type="text" name="dictElement.dictName" id="dictName" placeholder="请输入字典标示" maxlength="20"/>
</div>
</div>
<div class="control-group">
<label class="control-label" for="cssClass">选项样式</label>
<div class="controls">
<input type="text" name="dictElement.cssClass" id="cssClass" placeholder="请输入选项样式" maxlength="100"/>
</div>
</div>
<div class="control-group">
<label class="control-label" for="parentId">父字典项id</label>
<div class="controls">
<input type="text" name="dictElement.parentId" id="parentId" placeholder="请输入父字典项id" maxlength="2"/>
</div>
</div>
<div class="control-group">
<label class="control-label" for="orderNum">排序号</label>
<div class="controls">
<input type="text" name="dictElement.orderNum" id="orderNum" placeholder="请输入排序号" maxlength="10"/>
</div>
</div>
</form>
</div>
<div class="modal-footer">
<a href="javascript:;" class="btn btn-primary" id="btn_submit">保存</a>
<a href="javascript:;" class="btn" data-dismiss="modal" aria-hidden="true">关闭</a>
</div>
<script language="javascript">
void function(j) {
var validateSet = {
enname: {must: true, maxlength:20,ftip:'英文名称,20字长,必输项'},
cnname: {must: true, maxlength:100,ftip:'中文名称,100字长,必输项'},
dictName: {must: true, maxlength:20,ftip:'字典名称,20字长,必输项'},
cssClass: {must: true, maxlength:100,ftip:'css名称,100字长,必输项'},
parentId: {must: true, maxlength:2,handler:'int',ftip:'整数,必输项'},
orderNum: {must: true, maxlength:10,handler:'int',ftip:'整数,必输项'}
};
j('#btn_submit').click(function(e) {
if(form.validate(validateSet)){
//提示消息框
bootbox.alert('表单验证通过了,^_^!');
}
});
form.friend.init(validateSet);
}(jQuery);
</script>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/gaozengzhi/jshow-for-bootstrap.git
git@gitee.com:gaozengzhi/jshow-for-bootstrap.git
gaozengzhi
jshow-for-bootstrap
jshow for bootstrap
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385