autocomplete=“off” not working for Google Chrome

前端 未结 7 975
日久生厌
日久生厌 2020-12-12 00:55

This question has been asked Several times in the past but unfortunately there\'s no way i could disable autofill for Google Chrome (v.36.0.1985.125 m)

I have alread

相关标签:
7条回答
  • 2020-12-12 01:58

    Make type of password field as 'text' and change it to 'password' on click.

    HTML:

    <input autocomplete="off" id='username'>
    <input autocomplete="off" id='password' type="text" onclick="changeType('password')">
    

    js:

    changeType(id) {
        document.getElementById(id).setAttribute('type', 'password');
    }
    
    0 讨论(0)
提交回复
热议问题