私はこれを解決するために多くの試みを試みましたが、できません:クリックvalue="password"
しvalue ="Confirm password"
たときに値の型がtext
からpassword
1 つのボックスを変更できましたが、1 つのボックスではありpassword
ませんconfirm password
。問題は、input[type="password"]
1 つの位置しか追加できないためです。もう一方をクリックすると、confirm text box
直接ジャンプしますpassword text box
HTML
<input type = "passwords" id="passwords" name="passwords" value ="Password" onclick="passwords();" />
<input type = "confirm" id="confirm" name="confirm" value ="Confirm Password" onclick="confirms();" />
CSS
input[type="password"]
{
background: transparent;
border:none;
color:#2185c5;
height:41px;
width:273px;
padding-left:35px;
border-radius:3px;
font-size:20px;
position:absolute;
top:690px;
left:353.5px;
position:absolute;
z-index:11;
}
JS
function passwords()
{
document.getElementById("passwords").value= "";
document.getElementById('passwords').type = 'password';
}
function confirms()
{
document.getElementById("confirm").value= "";
document.getElementById('confirm').type = 'password';
}