$(this).form("validate") 始终返回false
onsubmit 提交前触发,返回 false 来阻止提交动作。
validate 进行表单字段验证,当全部字段都有效时返回 true 。该方法和 validatebox 插件一起使用。
解决:注释掉---- 存在属性validatebox,但是没有赋值的字段
网址:http://www.runoob.com/jeasyui/plugins-form-form.html
学习网址http://www.runoob.com/
//--------------------------------------------------------------保存(写入和更新)
function savePortDec() {
$("#fm").form("submit", {
url :"${path}/xxx/xxxx.do",
onSubmit : function() {
var isValid= $(this).form("validate");
return isValid;
},
success : function(result) {
var result = eval('(' + result + ')');
if (result.success) {
resetValue();
/* $("#dlg").dialog("close"); */
$("#dg").datagrid("reload");
} else {
}
$.messager.show( {
title : "系统提示",
msg : result.msg
});
}
});
}
随机推荐
- 好强大的vim配置文件
原文链接 http://www.cnblogs.com/ma6174/archive/2011/12/10/2283393.html
- 在word中输入任意角度旋转图片
Sub 图片旋转任意角度() Dim sha As Shape, isa As InlineShape Static s As Integer Application.ScreenUpdating = ...
- HDU 1269 迷宫城堡(向量)(Tarjan模版题)
迷宫城堡 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submis ...
- Find substring with K distinct characters
Given a string and number K, find the substrings of size K with K distinct characters. If no, output ...
- Server Tomcat v8.0 Server at localhost failed to start.的解决方法
1.可能是web.xml中的filter-mapping中url-pattern没加/* 2.可能是servlet和servlet-mapping中的servlet-name不匹配
- PostMan 使用Interceptor 发送带cookie的请求一直loading
问题 最近要写一个爬虫(虽然是第一次写),于是就用了Chrome上非常方便一个插件,PostMan,但是由于chrome安全的限制,发不出带cookie和带有自定义头部标签的请求. 百度一番后得如果想 ...
- 【BZOJ】1975 [Sdoi2010]魔法猪学院(A*)
题目 传送门:QWQ 分析 k短路,Astar.估价函数是终点向外跑的最短路. 显然不是正解qwq. 代码 // By noble_ // Astar algorithm // #include &l ...
- Web Api in Orchard
Web Api in Orchard Web Api is available in Orchard. You can implement a web api to fit your needs in ...
- python中的模块及包及软件目录结构规范
知识内容: 1.模块的定义与分类 2.模块的导入 3.模块与包 4.不同目录下的模块调用 一.模块的定义与分类 1.什么是模块 模块就是实现了某个功能的代码集合,模块是由一大堆代码构成的 类似于函数式 ...
- 讨论Android开发中的MVC设计思想
最近闲着没事,总是想想做点什么.在时间空余之时给大家说说MVC设计思想在Android开发中的运用吧! MVC设计思想在Android开发中一直都是一套比较好的设计思想.很多APP的设计都是使用这套方 ...