How to verify whether the password is consistent_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:40:21
Original
1970 people have browsed it

Now when making a user registration interface, how can the password and confirmation password be consistent and verified!


Reply to the discussion (solution)

You You can write a piece of js to get the values ​​of the two controls when the form is submitted, and then compare the two values. If they are equal, true will be returned. If they are not equal, a prompt message will pop up. If they are not equal, a prompt message will pop up. If false is returned, the form will be prevented from being submitted. This is the most basic way of writing
In fact, there are many verification plug-ins on the Internet, including basic commonly used verifications. Just go to the next one.

JS is enough if you are doing a personal website or it is not a big project

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