之前客服就给我反应过input自动匹配的问题,根据网上的资源改了发现还是有有问题,今天是2016最后一天工作日,没有其他工作就来把之前这些没有彻底修改的问题拿出来look,look。
问题现象:
就是像这种只要你input focus就有这种自动匹配的弹出来,有时候这种挺方便但是很多地方真的不需要,按照网友的方法给input 添加autocomplete="off"的属性,不起作用,尤其是chrome下
最后解决方法:
1、<div class="col-sm-8">
<input name="id" type="hidden"/>
<input name="username" type="text" class="form-control" aria-required="true" autocomplete="off">
</div>
type="text"类型的就这样就可以啦 也有说加在显示输入框后面,反正我是加在前面才生效
2、密码类型的
<div class="col-sm-8">
<input type="password" id="confirmpa" name="userpass" style="display:none;" autocomplete="off">
<input type="password" maxlength="6" class="form-control" aria-required="true" οnblur="document.getElementById('confirmpa').value=this.value;">
</div>
感觉是这个自动提示是跟着type和name这两个属性走的,创建一个隐藏的input来实时接收输入值。
这些都是个人理解