How do I disable the save password bubble in chrome using Javascript?

前端 未结 13 1960
不思量自难忘°
不思量自难忘° 2020-11-27 19:56

I need to be able to prevent the Save Password bubble from even showing up after a user logs in.

Autocomplete=off is not the answer.

I have not come across a

13条回答
  •  孤独总比滥情好
    2020-11-27 20:42

    The only thing worked for me was adding a space to input's value after document ready and then deleting the space when user focused on the input.

    $('.login-input').val(' ');
    $('.login-input').on('focus', function() {
        $(this).val('');
    });
    

    Simple and easy. Works on Chrome 64. In Firefox all you need is adding autocomplete="off" attribute to the input.

提交回复
热议问题