Input type=password, don't let browser remember the password

前端 未结 14 1448
孤城傲影
孤城傲影 2020-11-28 05:04

I remember seeing a way to have an such that the browser will not prompt the user to save the password. But I

相关标签:
14条回答
  • 2020-11-28 05:39
    <input type="password" placeholder="Enter New Password" autocomplete="new-password">
    

    Here you go.

    0 讨论(0)
  • 2020-11-28 05:40

    Here's the best answer, and the easiest! Put an extra password field in front of your input field and set the display:none , so that when the browser fills it in, it does it in an input that you don't care about.

    Change this:

    <input type="password" name="password" size="25" class="input" id="password" value="">
    

    to this:

    <input type="password" style="display:none;">
    <input type="password" name="password" size="25" class="input" id="password" value="">
    
    0 讨论(0)
提交回复
热议问题