如果你想让Firefox没有这么智能,不缓存你的input的值的话,需要进行如下修改:
<form> <input autocomplete="off" type="text" /><br /> <input autocomplete="off" type="text" /><br /> <input autocomplete="off" type="text" /><br /> <input autocomplete="off" type="text" /><br /> </form> 以上代码,给每一个input加上一个 autoconplete="off" 的属性,这样,就能阻止Firefox的默认缓存机制了。刷新之后,这些input的值都初始化。
还有一个写法,可以把全个表单中所有input都设置为不缓存的:
<form autocomplete="off"> <input type="text" /><br /> <input type="text" /><br /> <input type="text" /><br /> <input type="text" /><br /> </form>
最新评论