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

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

WBOY
Release: 2016-06-24 11:49:33
Original
4927 people have browsed it





Untitled Document




New Password:


Confirm Password:







Reply to discussion (solution)

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");
}
}

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template