第一种方式:页面初始化时直接绑定Validform
$(function(){
//部门编辑表单校验
$(".main_content form:first").Validform({
tiptype:3,
ajaxPost:true,
beforeSubmit:function(curform){
return true;
},
callback:function(data){ //alert("【"+JSON.stringify(data)+"】");
if(data.node.result == true){
var beanId = $("#info").find("input[name='formBean.beanId']").val();
$("#info").empty();
if(beanId && $.trim(beanId)!=""){
if(typeof window.refreshNode == "function"){
//刷新编辑后的节点
window.refreshNode(data.node);
}
}else{
if(typeof window.addNod
$(function(){
//部门编辑表单校验
$(".main_content form:first").Validform({
tiptype:3,
ajaxPost:true,
beforeSubmit:function(curform){
return true;
},
callback:function(data){ //alert("【"+JSON.stringify(data)+"】");
if(data.node.result == true){
var beanId = $("#info").find("input[name='formBean.beanId']").val();
$("#info").empty();
if(beanId && $.trim(beanId)!=""){
if(typeof window.refreshNode == "function"){
//刷新编辑后的节点
window.refreshNode(data.node);
}
}else{
if(typeof window.addNod