简体   繁体   中英

How to disable saved password features of browsers on add users form

How to disable saved password features of browsers on add users form. I am using autocomplete="off" but this is not woking for saved passwords in browser. I have searched more on this but did not find right solution till now. Any help is appriciated.

Below is the best solution for this

autocomplete="off" does not works for saved passwords.

You can use below step for this problem

1) Add readonly attribute to username and password

2) Now On onclick, onmouseover and onfocus remove this attribute.

  <input type="text" readonly="" onmouseover="$(this).removeAttr('readonly')" onclick="$(this).removeAttr('readonly')" onfocus="$(this).removeAttr('readonly')" value="" name="frmUsername" class="form-control">

You can also try first answer solution given at below links

Chrome Browser Ignoring AutoComplete=Off

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM