消除浏览器对input输入框的自动填充

针对chrome与firefox内核

<input type='text' style='display:none'> <!-- 针对firefox -->
用户名:<input type='text' autocomplete='off'>
密码:<input type='password' autocomplete='new-password'>

<input type='password' autocomplete="new-password" style="" readonly onfocus="this.removeAttribute('readonly');" onblur="this.setAttribute('readonly',true);" />>

  

原文地址:https://www.cnblogs.com/wdw31210/p/13343541.html