ITeye博客

火狐 input、select缓存,清除input缓存

lkf009 · 2013-07-23 16:28 · 浏览器兼容 · Web前端 · Markdown

火狐默认会缓存input的值,只有使用ctl+F5强制刷新的才可以清除 缓存记录。

如果不想让ff缓存input的值,有2种方法:

方法一:

      在不想使用缓存的input 中添加 autocomplete="off";

      例如:<input type="text" autocomplete="off" name="test" />

方法二:

      在input 所在的form 标签中添加 autocomplete="off";

      例如:

      <form action="#" autocomplete="off">

          <input type="text" autocomplete="off" name="test" />

      </form>

在ie中select缓存问题,() 

可以在页面加载时添加js代码控制select默认选定项 

document.getElementById("das").selectedIndex = 0;

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。