//前台获取密码页验证脚本
$(function () {
    $.fn.password({
        passwordInput: 'password',
        checkInput: 'checkpassword',
        strengthInfoText: 'infoText',
        strengthInfoBar: 'infoBar',
        checkInfoText: "checkInfoText"
    });
    $("#password,#checkpassword").keyup(function () {
        $.checkPassword();
    });
    var password = $("#password"), checkpassword = $("#checkpassword"), CheckCode = $("#CheckCode"), allFields = $([]).add(password).add(checkpassword).add(CheckCode);
    function ValidTemp() {
        var bValid = true;
        allFields.removeClass("ui-state-error");
        bValid = bValid && checkLength(password, "密码", 6, 16);
        bValid = bValid && checkEquals("密码", password, checkpassword);
        bValid = bValid && checkLength(CheckCode, "验证码", 4, 4);
        return bValid;
    };
    $("#resetbtn").click(function () {
        return ValidTemp();
    });
});