[英]How to disable browser prompt to remember the password
我必须禁用浏览器提示以记住登录表单上的密码,我尝试过AUTOCOMPLETE =“ OFF”,但它不起作用
Can you please share your code. 能否请您分享您的代码。 Especially that password tag. 特别是那个密码标签。
I have faced the same problem. 我也遇到过同样的问题。 But this has fixed by below code. 但这已通过以下代码修复。
@Html.TextBoxFor(m => m.Password, new { @id ="Password", @Placeholder = "Password", @type = "Password", @required = "required", @Value = "", @autocomplete = "off" })
Try this HTML: 试试这个HTML:
<input type="text" name="password" required autocomplete="off">
and JS: 和JS:
function validate() {
$("input[name='password']").attr("type", "password");
}
$('input[name="username"]').on('keyup click', validate);
$('input[name="password"]').on('keyup click', validate);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.