I have to disable browser prompt to remember the password on login form, I have tried AUTOCOMPLETE="OFF" but it doesn't work
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
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" })
回答2:
Try this HTML:
<input type="text" name="password" required autocomplete="off">
and JS:
function validate() {
$("input[name='password']").attr("type", "password");
}
$('input[name="username"]').on('keyup click', validate);
$('input[name="password"]').on('keyup click', validate);