Now when making a user registration interface, how can the password and confirmation password be consistent and verified!
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