input框,需要隐式显示的时候,不让它自动填充的办法

input处理:

通过添加readonly&onfocus =“this.removeAttribute('readonly');  

<input type="password" name="Password" autocomplete="off" readonly   
onfocus="this.removeAttribute('readonly');" >  

样式处理:

input[readonly]{
  background-color: #fff
}

 

posted @ 2019-07-04 16:48  小番茄酱  阅读(991)  评论(0编辑  收藏  举报