日期:2014-05-16  浏览次数:20333 次

在IE或Sleipnir下,用history.back()返回后为何都变空?
在IE或Sleipnir下,用<a href="javascript:history.back();">返回后,

<input type="text"...>里的值都变空,
而<input type="radio" ...>或<input type="checkbox" ...>可以保持被选中。

我也设了<meta http-equiv="Expires" content="1800"> 都不管用。
Why?



------解决方案--------------------
因为IE不支持autoComplete功能,你可以在form标签上写autocomplete="off",这样在chrome和ie下表现就一致了
然后回答你的问题,要想ie支持,必须使用js,在input失去焦点之后,把input的值写入到cookie,然后在页面载入后读取cookie的内容并写入input
如果Input多了建议就别搞了,很麻烦的