EasyUI DataGrid 编辑数据 加邮箱验证 Input 邮箱验证
DataGrid: JSP: <th data-options="field:'email_mail',width:465,editor:'validatebox', editor:{type:'validatebox',options:{required:true,validType:'email'}}">邮箱</th> JS: columns:[[ {field:'no',title:'编号',width:50,editor:'numberbox'}, {field:'name',title:'名称',width:60,editor:'text'}, {field:'addr',title:'地址',width:100,editor:'text'}, {field:'email',title:'电子邮件',width:100, editor:{ type:'validatebox', options:{ validType:'email' } } }, {field:'birthday',title:'生日',width:80,editor:'datebox'}, {field:'action',title:'操作',width:70,align:'center', formatter:function(value,row,index){ if (row.editing){ var s = '<a href="#" onclick="saverow('+index+')">保存</a> '; var c = '<a href="#" onclick="cancelrow('+index+')">取消</a>'; return s+c; } else { var e = '<a href="#" onclick="editrow('+index+')">编辑</a> '; var d = '<a href="#" onclick="deleterow('+index+')">删除</a>'; return e+d; } } } ]], validType:'email' 为邮箱验证 required:true 为必输项 input: <input class="easyui-validatebox" validtype="email" required="true" missingMessage="不能为空" invalidMessage="邮箱格式不正确" /><br /> 或 <script> $(function () { //设置text需要验证 $('input[type=text]').validatebox(); }) </script> <input type="text" validtype="email" required="true" missingMessage="不能为空" invalidMessage="邮箱格式不正确" />
相关推荐
89427412 2020-02-13
morexyoung 2019-12-20
EdwardSiCong 2015-04-11
ningwentao 2015-10-21
zderam的私人 2019-09-02
shanhuijava 2016-08-17
wndong 2016-03-04
AngelicaA 2015-12-22
xiaobozhu 2015-10-27
yypiao 2015-10-21
小策一喋 2015-09-17
小仙儿 2015-06-15
huzai 2015-06-03
zhangmingming 2015-03-11
大数据实战派 2015-02-04
葉無聞 2015-01-01
sunnylinner 2014-12-19
pplxh 2014-10-21