From a059043c47a14ddf7172f61ee0b9824417e92e16 Mon Sep 17 00:00:00 2001 From: chenyang Date: Thu, 30 Jun 2022 15:19:26 +0800 Subject: [PATCH] update --- static/html/dashboard.html | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) 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 })