密码确认

$.extend($.fn.validatebox.defaults.rules, {       

  /*必须和某个字段相等*/        

equalTo: { validator: function (value, param) {

  return $(param[0]).val() == value; }, message: '字段不匹配'

}     });

 

 密码: <input id="password" name="password" validType="length[4,32]" class="easyui-validatebox" required="true" type="password" value=""/><br/>           确认密码:<input type="password" name="repassword" id="repassword" required="true" class="easyui-validatebox"  validType="equalTo['#password']" invalidMessage="两次输入密码不匹配"/>

你可能感兴趣的:(密码)