diff --git a/static/html/dashboard.html b/static/html/dashboard.html index 9ce038e..a3527a0 100644 --- a/static/html/dashboard.html +++ b/static/html/dashboard.html @@ -70,6 +70,13 @@ const inputPassword = $('#inputPassword').val(); const inputPassword_ = $('#inputPassword_').val(); // 校验输入是否一致 + const validate = validate_pw_eq(this, inputPassword, inputPassword_) + if (validate) { + + } + }); + + function validate_pw_eq(obj, inputPassword, inputPassword_) { if (inputPassword !== inputPassword_) { const alert_component = ` ` - $(this).after(alert_component) + $(obj).after(alert_component) setTimeout(function () { $('#register_alert').fadeOut(1200) }, 1000) + return false } - }); + return true + } // js end })