输入类型=密码,不要让浏览器记住密码 [英] Input type=password, don't let browser remember the password
问题描述
我记得有一种方法可以让< input type =password/>
使浏览器不是提示用户保存密码。但我正在画空白。有没有一个HTML属性或一些JavaScript技巧可以做到这一点? 尝试使用 autocomplete =关
。但不知道是否每个浏览器都支持它。 MSDN文档此处。
编辑:注意:大多数浏览器都不支持此属性。请参阅自动完成=关闭与所有现代浏览器兼容?
这可以说是应该留给用户的东西,而不是网站设计师。
I remember seeing a way to have an <input type="password" />
such that the browser will not prompt the user to save the password. But I'm drawing a blank. Is there an HTML attribute or some JavaScript trick that will do this?
Try using autocomplete="off"
. Not sure if every browser supports it, though. MSDN docs here.
EDIT: Note: most browsers have dropped support for this attribute. See Is autocomplete="off" compatible with all modern browsers?
This is arguably something that should be left up to the user rather than the web site designer.
这篇关于输入类型=密码,不要让浏览器记住密码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!