天天看點

關閉輸入框自動完成 firefox msie disable input autocomplete

English Title:Shut input casing to finish Firefox Msie Disable Input Autocomplete automatically

firefox 和 ie 的浏覽器各自實作了input曆史記錄的功能,可以簡化輸入時的麻煩,但是,有時候彈出的下拉框會擋住頁面顯示内容,而且在某些情況下也不需要對 input框進行記錄,如号碼查詢的input框,使用者不會對同一個号碼進行多次查詢,就沒有必要讓浏覽器記錄。MSIE自定義了input 的擴充屬性 autocomplete,置為off即可<input type="text" autocomplete="off" id="number"/>用這個方法可以屏蔽MSIE,Firefox則需要使用另一個擴充屬性disableautocomplete< input type="text" disableautocomplete id="number"/>兩擴充屬性可以同時使用,浏覽器會根據自身特性自動解析。

==========English==========

The browser of Firefox and Ie realized the function that Input history records severally, can simplify the trouble when the input, but, play next conferences drawing circle that give to hold off a page to show content occasionally, and also do not need to have a record to Input casing below certain circumstance, be like the Input casing that number inquires, the user won't be right same number undertakes for many times inquiring, not was necessary to let a browser record. MSIE defined the patulous attribute Autocomplete of Input oneself, buy is Off can it is OK that <input Type="text" Autocomplete="off" Id="number"/> uses this method screen MSIE, firefox needs to use another to expand two patulous attribute can use attribute Disableautocomplete<input Type="text" Disableautocomplete Id="number"/> at the same time, the browser is met according to oneself character automatic and analytic.

經我測試最新的浏覽器firefox 3.6和ie 8 都支援 autocomplete="off"

繼續閱讀