Home >Web Front-end >HTML Tutorial >When the passwords entered twice are inconsistent, why does the pop-up popup shows that the passwords entered twice are consistent_html/css_WEB-ITnose
function checkPasswords() {
var pass1 = document.getElementsByName("password1")[0];
var pass2 =document.getElementsByName("password2")[0];
if (pass1.value!=pass2.value)
{
alert("The passwords entered twice are inconsistent");
}
else
{
alert("The passwords entered twice are consistent");
}
}