經過測試,對chrome42,重寫input: auto-fill樣式不起作用,加上autocomplete="off"也不起作用。
因此使用了兩個隱藏的輸入框:
<input type="text" style="display:none"/>
<input type="password" style="display:none"/>
或
將表單標簽<form></form>去掉,加上autocomplete="off"
瀏覽器會將保存的信息填到這兩個隱藏輸入控件上,達到了想要的效果。