1
Help us understand the problem. What are the problem?

More than 1 year has 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)
        }
    }
}
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
1
Help us understand the problem. What are the problem?