Masking input characters without type=password

前端 未结 6 952
-上瘾入骨i
-上瘾入骨i 2020-12-30 22:30

So I have a problem with newer browsers saving passwords. Say I have a password box like so:


         


        
6条回答
  •  失恋的感觉
    2020-12-30 23:22

    The solution that worked for me was like this :

    First input type should be text

    At the focus event turn input type to password

    Listen for user inputs and if input field value is empty set type to text again

    This way at the start and when input field is empty browser will not show suggestions.

提交回复
热议问题