谷歌浏览器input自动填充问题
1.不允许密码自动填充
<input type="text" autocompleted="off" /> <input type="password" autocompleted="new-password" />
<input type="password" autocompleted="new-password" style="display:none"/>
2.不允许用户名自动填充,但是获取焦点能获取历史账号信息。
若只有用户名没有密码,写一个密码框设置为隐藏格式
<input type="text" readonly /> $("#userId").mouseenter(()=>{ $("#userId").removeAttr("readonly"); });
以前未深想,此间未重逢

浙公网安备 33010602011771号