我需要停止浏览器存储用户名和密码值,因为我正在处理包含更多安全数据的Web应用程序。客户要求我这样做。
我尝试了autocomplete="off"
HTML表单和密码字段中的属性。但它无法在最新的浏览器(例如Chrome 55,Firefox 38 +,Internet Explorer 11等)中运行。
最好的解决方案是什么?
感谢您给我回复。我点击了以下链接
我通过仅在输入中添加readonly
&onfocus="this.removeAttribute('readonly');"
属性autocomplete="off"
来解决此问题,如下所示。
<input type="text" name="UserName" autocomplete="off" readonly
onfocus="this.removeAttribute('readonly');" >
<input type="password" name="Password" autocomplete="off" readonly
onfocus="this.removeAttribute('readonly');" >
这对我来说很好。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句