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