LoginSignup
0
1

More than 3 years have passed since last update.

パスワード変更ロジック

Posted at

中にあるconsole.logはjsでは出力することが出来ない
reactになれがリアルタイムで反映することできる、、、はず...?


const Form = document.getElementsByTagName("form");
let PasswordValue = "aaaaa";
const nowPassword = document.getElementById("now_password");
nowPassword.textContent = "現在のパスワードは"+ PasswordValue;


function setPassword() {
    const confirmPassword = document.getElementById("confirm_password").value
    const newPassword = document.getElementById("new_password").value
    console.log(confirmPassword)
    console.log(newPassword)
    alert(PasswordValue)
    if (PasswordValue===confirmPassword) {
        if (PasswordValue != newPassword) {
            let PasswordValue = newPassword;
            alert(PasswordValue)
        }
    }
}
0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1