作项目的过程当中,发现系统新建用户时,浏览器会自动填充帐号和密码,解决问题以下:浏览器
1. 在不须要填充的组件中加入autocomplete = “new-password”bash
可是这个只适用于谷歌浏览器,因而,又找到了另一种办法.ide
2. 在用户输入框前增长下面的输入框,用样式设置成隐藏效果,用于保存填充的用户名、密码;
ui
<input type="text" name="hide_name" value="随便" style="position: absolute;z-index: -1;" disabled autocomplete = "off"/><input type="password" name="hide_pwd" value=" " style="position: absolute;z-index: -1;" disabled autocomplete = "off"/>复制代码