首页 > Web开发 > 详细

js调用MVC3自带js验证

时间:2014-10-30 22:31:14      阅读:333      评论:0      收藏:0      [点我收藏+]
验证:
 if ($(this).is("form")) {
                        return $(this).validate().checkForm();
                    }
事例:
$($.thisView.windowAddId + "-form").form({ onSubmit: function () { //进行表单验证 //如果返回false阻止提交 if ($(this).is("form")) { return $(this).validate().checkForm(); } return false; }, success: function (jsonResult) { jsonResult = $.parseJSON(jsonResult); if ($("#KeepOnAdd").is(":checked")) { $.clearValue($.thisView.windowAddId + "-form"); } else { $.tips(jsonResult); $($.thisView.windowAddId).window("close"); } $($.thisView.datagridId).datagrid("reload"); } }).submit();

 

js调用MVC3自带js验证

原文:http://www.cnblogs.com/jaday/p/4063773.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!