Javascript-what is the front-end password verification mechanism?

Source: Internet
Author: User
The keyup form event reads the characters in the input box .. Q: How about security? can I change the event? how do you do it? 1. I understand that security refers to how jq's keyup or change reads and recognizes the input characters. what is the mechanism in it, since it can be... the keyup form event reads the characters in the input box ..

Q: How about security? can I change the event? how do you do it?

1. I understand that security refers to how jq's keyup or change reads and recognizes the input characters. what is the mechanism in it? since it can be read by the front-end, you mean you can intercept it? Or is it recognized inside the browser? Puzzled

Reply content:

The keyup form event reads the characters in the input box ..

Q: How about security? can I change the event? how do you do it?

1. I understand that security refers to how jq's keyup or change reads and recognizes the input characters. what is the mechanism in it? since it can be read by the front-end, you mean you can intercept it? Or is it recognized inside the browser? Puzzled

I don't know what security you mean. does it mean the ability to ensure site security by verifying user input through the front-end?

For the server, the correct method is that all parameters passed by the front end should not be trusted. In other words, the front-end performs strict and reasonable verification on user input. when transferred to the server, the server must re-verify the incoming data. You can also understand that the purpose of front-end verification is not to protect site security, but to serve users in order to improve user experience.

keyup,change,blurIt is used in the actual development process. the specific event to be selected for listening is determined based on your specific purpose of verification.keyupComparedchange,blurIt is more real-time and can quickly verify or judge user input. For example, if you set a logon password in the registry list, you can monitor the event to quickly determine the password strength and display it to the user to remind the user to increase the password strength. However, real-time performance may not be the best. We also use a registry ticket for example. When verifying whether a user account name existskeyupWhen you press the button to make a judgment, the front-end page will send a large number of requests to the server during user input, this will cause a lot of unnecessary pressure on the server, consume a lot of client resources, and even cause uncontrollable form verification. Then listenchangeOrblurThe event is more reasonable.

I don't know what security means by the subject?

Does the keyup form event read the characters in the input box? is this a front-end js listener?

In fact, for front-end security, as long as the front-end is considered completely insecure, any illegal input may occur, the entire website will be secure.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.