需求:
实现密码输入框,并不使用记忆功能
问题:
当type="password"时autocomplete="off"、autocomplete="new-password"均不管用
解决方法:
将type设为text类型 type="text"
并将输入框内容设置圆点显示,如下:
text-security:disc; -webkit-text-security:disc; -mox-text-security:disc;
eg:
html:
<input type='text' id='inputId'/>
css:
#inputId{
text-security:disc;
-webkit-text-security:disc;
-mox-text-security:disc;
}