Implementation of password desensitization by js

requirements: when entering a password, the specific characters are displayed first; after input, all are displayed as asterisks (not from a security point of view, and password users do not know whether the input is correct or not, so it becomes *,
such as a-> *, aa- > * a > *, aaa- > * * a-> *) after 0.5s for experiential display. )

my idea: although the password is processed with "*", the background parameter transfer still needs the original data.

    inputAtype= "hideen" 
    Bkey up"*" 

problems in implementation: for example, delete keys, alt/shift and other keys will have bug,. Is there a more reasonable way to deal with them

Jun.16,2021

dynamically change the type of input. Text and password are interchangeable. Don't bother so much


you seem to be teasing me. Doesn't the data you put on hidden still pass parameters at the end? What. Don't you think about it here?

https find out? What do you know about data encryption? Public key encryption? Private key decryption?


what's wrong with using < input type= "password" > directly? When it is displayed, it is * , and the value is the actual input value, which can not meet your requirements?


when transmitting, if it is http protocol, it is still transmitted in plain code, and if it is https, it is encrypted.
your process is meaningless, which needs to be implemented in conjunction with the server side, not a problem solved by the client alone.

Menu