https://www.zhihu.com/question/23529765 

综合以上答案 可以这样写,但是我也只是测试了chrome与firefox,可行的

用户名:<input type="text" autocomplete="new-accounts">
密码:<input type="text" autocomplete="new-password" readonly onfocus="this.removeAttribute('readonly');this.type='password'" onblur="this.setAttribute('readonly',true);">

chrome的实现方案:

<input type="password" autocomplete="new-password" name="pwd" placeholder="密码" readonly onfocus="this.removeAttribute('readonly');this.type='password'"/>

 

Logo

前往低代码交流专区

更多推荐