菜鸟请教各位大虾,是一个关于reload 与submit 的问题

haif1978 2002-08-28 10:02:40
在一个asp页中,有若干个文本框,其中有两个文本框是写入了值,而另外有一个文本框与一个button,点击button打开一个对话框,然后在关闭对话框时,从对话框中传回若干个值,前提是得reload一下页面,才能得到刚从对话框中所过来的值,请问能用什么方法能够记住前两 个文本框中的值,在reload之后,前两个文本框还可以有以前所填写的值。
...全文
35 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
孟子E章 2002-08-28
  • 打赏
  • 举报
回复
saveHistory Behavior

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

Enables the object to persist data in the browser history.

Syntax

XML

<Prefix: CustomTag ID=sID STYLE="behavior:url('#default#saveHistory')" />

HTML

<ELEMENT STYLE="behavior:url('#default#saveHistory')" ID=sID>

Scripting

object.style.behavior = "url('#default#saveHistory')"
object.addBehavior ("#default#saveHistory")

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 Internet Explorer 5, in the Microsoft® Win32® and Unix platforms.

孟子E章 2002-08-28
  • 打赏
  • 举报
回复
<HTML>
<HEAD>
<META NAME="save" CONTENT="history">
<STYLE>
.saveHistory {behavior:url(#default#savehistory);}
</STYLE>
</HEAD>
<BODY>
<INPUT class=saveHistory type=text id=oPersistInput>
</BODY>
</HTML>
孟子E章 2002-08-28
  • 打赏
  • 举报
回复
window.opener.document.formname.inputname.value="xx"
cross311 2002-08-28
  • 打赏
  • 举报
回复
用session("")("")吧

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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