如何在添加用户表单时禁用浏览器保存的密码功能 [英] How to disable saved password features of browsers on add users form
问题描述
如何在添加用户表单时禁用浏览器保存的密码功能。
我正在使用autocomplete =off,但这并不是为浏览器中保存的密码开火。
我在这方面进行了更多搜索,但直到现在才找到正确的解决方案。
任何帮助都是appriciated。
以下是此
$的最佳解决方案b $ b
autocomplete =off不适用于保存的密码。
您可以使用下面的步骤解决此问题。
1)将只读属性添加到用户名和密码
2)现在onclick,onmouseover和onfocus删除此属性。
< input type =textreadonly =onmouseover =$(this).removeAttr('readonly')onclick =$(this ).removeAttr('readonly')onfocus =$(this).removeAttr('readonly')value =name =frmUsernameclass =form-control>
您也可以尝试先回答以下链接给出的解决方案。
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
这篇关于如何在添加用户表单时禁用浏览器保存的密码功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!