menu
more_vert
提交form表单---修改密码ajax、jQuery

作者:dayu


 jquery:

$(function() {
  $("#sub").click(function(){ $("#password").form("submit",{ url:"xiuGaiPasswServlet", onSubmit: function(){ var s = $("#passsword").form("validate"); if(s) { return true; } else { $.messager.alert("提示","信息填写不完整","info"); return false; } },      success:function(data){ var data1 = eval("("+data+")"); if(data1.success){ $.messager.alert("提示","修改密码成功","info"); $("#xiugaimima").window("close"); } else { $.messager.alert("提示","修改失败","info"); } if(data1.success1){ $.messager.alert("提示","两次密码不一致","info"); } if(data1.success2){ $.messager.alert("提示","原始密码错误","info"); }   } }); });
});

  

easyui-validatebox:验证框

提交form表单---修改密码 ajax、jQuery

原文地址:http://www.cnblogs.com/gonghuixin/p/7193896.html