如何禁止浏览器自动填充表单历史数据

在表单的输入框中加上:autocomplete="new-password"。

<input type="password" id="password" name="password" 
    class="input-block-level required alphanumeric" autocomplete="new-password"/>

亲测好用,可以使得在页面加载的时候表单是空白的,不会填充历史数据,但单击输入框之后历史数据仍然会出现联想列表

猜你喜欢

转载自blog.csdn.net/Java_Long_Asus/article/details/84137609