Change Password box content event when mobile login box changes

Source: Internet
Author: User

Long time did not write the blog record, said busy is also an excuse AH. or more records.

Recently in the mobile phone, the login page encountered a problem, that is, I want to change the account login, once the account has changed the password should be emptied. The KeyUp event can be used on a PC. However, on the phone side of the KeyUp event problems, the mobile phone soft Keyboard Delete button (that is, the Small fork button) Click on the KeyUp event some phones are not captured, specifically which models have forgotten. Finally, Baidu used the "PropertyChange" event. Is the input box content change event, the content once changed to clear the password box, even if it is copied paste can be captured.

But there is a problem, I lost the wrong account, the password has been lost. I have to re-enter the password to change my account. (but it seems reasonable to think so.)

As follows:

Some of the jquery codes are as follows:

$ ("#account"). On ("Input PropertyChange", function () {         if ($ ("#account"). Val (). Trim (). length! = one) {            $ ("# Password "). Val (" "); If the account is not 11 bits, set the password box to empty        }    });

Because of special reasons, the account limit for mobile phone number, so more than a length of judgment.

Not with the new blog is because lazy did not learn new things. The next step is to study hard and take notes. Learning is going to output, the output is very important. This is a new idea even if it's warm.

Change Password box content event when mobile login box changes

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.