Home >Web Front-end >HTML Tutorial >How to verify whether the password is consistent_html/css_WEB-ITnose

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

WBOY
WBOYOriginal
2016-06-24 11:40:211995browse

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

Statement:
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