2

I am trying to disable google password autocomplete field in password text-box in chrome browser. I tried autocomplete off but that doesn't work then I tried auto complete : "new password" that also doesn't work. Suggest me any solution for this problem. Thanks in advance. here is my code i tried autocomplete="new-password"

2 Answers2

0

I've tried to disable it -- at this point only thing i the autocomplete='off' doesn't work

i would try this -- set the password box with a value on the pageload

$("input[type='password']").val(" ");

on focus set the value to empty

$(document).on("focus","input[type='password']",function(){                  
    $(this).val('');
});
linc
  • 84
  • 2
0

For this you can use a trick. Chrome always track first <input type="password"> and the previous <input>. So add this:

<input style="display:none">
<input type="password" style="display:none">

To just after <form> tag started and the case will be resolved.

Rana Ghosh
  • 4,139
  • 4
  • 19
  • 37