无法让浏览器忘记MVC中的密码字段

时间:2016-05-17 11:45:51

标签: javascript html asp.net asp.net-mvc passwords

我查看了网页上的许多页面以及该页面上提到的许多方法here,但它们都没有适用于所有浏览器。这些页面中最好的方法之一如下图所示;但是ID在Chrome中不起作用。是否有可能使浏览器不记得MVC中的密码字段?请不要将已知的解决方法建议为" autocomplete = off"没有在所有最新版本的主浏览器上测试它。

普兰克 - Disable browser 'Save Password' functionality

<form method="post" action="yoururl">
    <div class="hidden">
    <input type="password"/>
    </div>
    <input type="text" name="username" placeholder="username"/>
    <input type="password" name="password" placeholder="password"/>
</form>

<style>
    .hidden { display: none; }
</style>

0 个答案:

没有答案
相关问题