日期:2014-05-16  浏览次数:20368 次

用CompareValidator控件判断2次输入密码是否一致,但始终是返回密码输入不一致,求解?

$("#password1").formValidator(
     {
     tipid:"password1tip",
     onshow:"请输入密码",
     onfocus:"请输入密码",
     oncorrect:"密码输入正确"
     }
            ).RegexValidator(
     {
     regexp:"notempty",
     datatype:"enum",
     onerror:"请输入密码"
     }
    )
 
$("#password2").formValidator(
                    {
                        tipid:"password2tip",
                        onshow:"请再次输入密码!",
                        onfocus:"再次输入密码。",
                        oncorrect:"两次输入一致!"
                    }
            ).RegexValidator(
                    {
                        regexp:"notempty",
                        datatype:"enum",
                        onerror:"请再次输入密码!"
                    }
            ).CompareValidator(
                    {
                        desid:"password1",
                        operateor:"=",
                        onerror:"两次输入的密码不一致!"
                    }
            );

------解决方案--------------------
.CompareValidator(
                    {
                        desID:"password1",
  &nbs