有人遇到过在按返回键返回到上一个页面时,却全部丢失了form中的数据的问题吗?奇怪了.我从来没有遇到过!!!

jsidiot 2002-09-27 11:29:16
盼解决
请教各位
我在一个一个form中输入了输入了很多资料
却全部不见了
如何解决
...全文
60 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
jsidiot 2002-09-28
  • 打赏
  • 举报
回复
我再推一下那
快点解决把
无爱大叔 2002-09-28
  • 打赏
  • 举报
回复
.saveHistory {behavior:url(#default#savehistory);}
是CSS吗,孟子兄,可以解释一下吗
jsidiot 2002-09-28
  • 打赏
  • 举报
回复
请问孟子用的是xml嘛?
好像正规的js和html,vbs都没有这种样式把
cleo 2002-09-28
  • 打赏
  • 举报
回复
我也遇到过,原因不详,
浏览器问题吧!换一个版本浏览器就不会这样了。
qiushuiwuhen 2002-09-28
  • 打赏
  • 举报
回复
Web Workshop | DHTML, HTML & CSS
saveHistory Behavior

--------------------------------------------------------------------------------

Enables the object to persist data in the browser history.

Syntax

XML N/A
HTML <ELEMENT STYLE="behavior:url('#default#saveHistory')" ID=sID>
Scripting object.style.behavior = "url('#default#saveHistory')"
object.addBehavior ("#default#saveHistory")

Possible Values

sID String that specifies a unique identifier for the object.


Members

AllAttributesPropertiesMethodsEventsCollectionsBehaviors Description
getAttribute Retrieves the value of the specified attribute.
onload Fires from a persistent element when the page reloads.
onsave Fires from a persisted element when the Web page is saved or bookmarked, or when the user navigates away from the page.
removeAttribute Removes the specified attribute from the object.
setAttribute Sets the value of the specified attribute.
XMLDocument Retrieves a reference to the XML Document Object Model (DOM) exposed by the object.

* denotes an extension to the W3C DOM.
Remarks

The saveHistory behavior saves the current state of the page when the user navigates away from the page. When the user returns to the page by pressing the back or forward button, the values are restored.

The saveHistory behavior persists only for the current session. When the user navigates away from the page containing the saveHistory behavior, the data is persisted in a UserData store. The saveHistory behavior uses one UserData store for the entire document. Thus, if two elements write the same attribute, the first is overwritten by the second. The UserData store is saved in an in-memory stream and is not saved to disk. Therefore, it is not available after the user closes Microsoft® Internet Explorer.

For example, a page with several dynamically updated styles might save these updates using the onload and onsave event handlers. The style values can be saved as attributes when onsave fires, and restored when onload fires.

To use the saveHistory behavior, use a META tag that identifies the type of persistence.

<META NAME="save" CONTENT="history">

The required STYLE can be set inline or in the document header, as follows:

<STYLE>
.saveHistory {behavior:url(#default#savehistory);}
</STYLE>

An ID is optional for saveHistory, but including one improves performance.

The saveHistory behavior is available as of Microsoft® Internet Explorer 5, in the Microsoft® Win32® and Unix platforms.
孟子E章 2002-09-27
  • 打赏
  • 举报
回复
<HTML>
<HEAD>
<META NAME="save" CONTENT="history">
<STYLE>
.saveHistory {behavior:url(#default#savehistory);}
</STYLE>
</HEAD>
<BODY>
<INPUT class=saveHistory type=text id=oPersistInput>
<INPUT class=saveHistory type=text id=oPersistInput>
<INPUT class=saveHistory type=text id=oPersistInput>
</BODY>
</HTML>

87,996

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧