360浏览器记住密码状态表单自动填充问题

解决办法:

在表单内的最上方添加以下两个空元素,让其自动填充进空元素内,设置其不可见。

<input type="text" id="aaa" style="visibility: hidden;" />
<input type="password" id="aba" style="visibility: hidden;" />
 
在该方法中发现设置为display:none时无效,当设置为visibility: hidden;才能发生作用
 
 
但是在我使用上述方法的过程中,原本在9.0+的版本没问题,但是更新到10.0+的最新版本后,有点页面还是自动填充,用js置为空也不行。在仍是自动填充的页面我是这么做的
1、第一步还是加两个假标签填充
<input type="text" name="username" disabled style="visibility: hidden;" />
<input type="password" name="password" disabled style="visibility: hidden;" />
但是这时候我的name没有和页面上的一致,而是为记住密码时的键名,不知道有没有关系,先记录下来
2、给真正呈现的密码框添加 type="text" onfocus="this.type='password'"  ,就是将type="password"改为 type="text",然后聚焦时候修改类型
整个代码如下:
<!-- 假的控件,用来填充 -->
<input type="text" name="username"  disabled style="visibility: hidden;" />
<input type="password"  name="password" disabled style="visibility: hidden;" />
<!-- 真控件 -->
<input name="musername" type="text" class="form-control" id="musername" required/>
<input name="rempass_word" name="rempass_word" type="text" onfocus="this.type='password'" class="form-control" id="rempass_word"  required/>

然后就可以了。

 
原文地址:https://www.cnblogs.com/plb2307/p/10831799.html