当前位置: 代码迷 >> Web前端 >> 封锁输入框自动完成 firefox msie disable input autocomplete
  详细解决方案

封锁输入框自动完成 firefox msie disable input autocomplete

热度:825   发布时间:2012-10-28 09:54:44.0
关闭输入框自动完成 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"

  相关解决方案