jQuery MiniUI
标题:
mini-treeselect 进行requried="true"无效
[打印本页]
作者:
weng_gh
时间:
2012-10-26 15:20:52
标题:
mini-treeselect 进行requried="true"无效
本帖最后由 weng_gh 于 2012-10-26 15:25 编辑
代码如下:
<input id="dept" class="mini-treeselect" url="xx" multiSelect="false"
style="width: 213px;float:left" expandOnLoad="true" allowInput="false" name="departId" textField="name"
required="true" valueField="id" parentField="pid" />
mini.parse();
var userForm = new mini.Form("#userForm");
userForm.validate();
if (userForm.isValid() == false){
return;
}
这个无效是指没有值时 即无红色提示,userForm.isValid() =true
win7和IE9
作者:
factory
时间:
2012-10-26 15:41:13
<div id="form1">
<input id="select1" class="mini-treeselect" url="../data/listTree.txt" multiSelect="true"
textField="text" valueField="id" parentField="pid" checkRecursive="true"
showFolderCheckBox="false" expandOnLoad="true" required="true"
/>
<input type="button" onclick="submitForm()" />
</div>
<script type="text/javascript">
mini.parse();
function submitForm() {
var form = new mini.Form("#form1");
form.validate();
if (form.isValid() == false) return;
}
</script>
复制代码
1.更新下你的miniui
2.页面要加<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
作者:
weng_gh
时间:
2012-10-26 16:35:06
多谢版主,问题解决
欢迎光临 jQuery MiniUI (http://miniui.com/discuss/)
Powered by Discuz! X2