JS 验证框架 formcheck

http://mootools.floor.ch/en/labs/formcheck/forum-registration/

 

$(document).ready(function(){
                
new FormCheck('formular');
 });

代码
$(document).ready(function(){
                
new FormCheck('formular',
                {
                  submitByAjax:
true,
                  onAjaxSuccess:onajaxsuccess
                });
                
function onajaxsuccess(arg){
                    
if(arg==1){
                        ymPrompt.succeedInfo({title:
'消息',message:'添加成功!'});
                        $(
"form")[0].reset();
                    }
else{
                        ymPrompt.errorInfo({title:
'消息',message:'添加失败!'});
                    }
                    setTimeout(
function(){ymPrompt.doHandler('ok')},2000);
                }
});


下载 

posted @ 2010-11-16 14:00  天纯蓝  阅读(2029)  评论(0编辑  收藏  举报