Masking input characters without type=password

前端 未结 6 951
-上瘾入骨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:24

    Have you tried changing the name attribute to something ridiculous? I believe the autocomplete functionality is based off the name attribute. I'm not 100% sure but in the limited testing I did changing the name attribute was changing what type of autocomplete data was being presented.

    Obvious example just to be clear: name="username" was showing my username while name="email" was showing my previously entered email addresses. When I switched to name="browsersAreStupidForImplementingThisFeature" I didn't get any autocomplete data.

    Needs further testing but might be a good place to start? Good luck

提交回复
热议问题