<input type="password" placeholder="密码" readonly onfocus="this.removeAttribute('readonly');"/>
用js去清除input的value值是无效的,因为浏览器填充账号密码的动作是在js执行完之后发生的。
<input type="password" placeholder="密码" readonly onfocus="this.removeAttribute('readonly');"/>
用js去清除input的value值是无效的,因为浏览器填充账号密码的动作是在js执行完之后发生的。