Topic: 如何实现 (怎么保持前一个JSP页面中输入的内容在“后退”以后还能有)

  Print this page

1.如何实现 (怎么保持前一个JSP页面中输入的内容在“后退”以后还能有) Copy to clipboard
Posted by: AT
Posted on: 2003-03-22 19:35

怎么保持前一个JSP页面中输入的内容在“后退”以后还能有?

2.Re:如何实现 [Re: AT] Copy to clipboard
Posted by: gunrose
Posted on: 2003-03-23 09:49

对于前一页在网页上添加hidden域,用hidden来存储本页数据,并把请求交给后一页。

后一页接到请求,
1。如果允许使用session的话:
把数据放入session。当用户回到前一页时,先去看session中有无数据,如果有,显示session的数据。就达到了你的目的

2。如果不允许使用session的话:
这样的话比较麻烦。要在页面上加一个后退按钮,要求用户点击它来后退。当点击它时,后一页会把前一页的数据当作本页的hidden数据或者参数传递到前一页。让前一页来处理

3.Re:如何实现 [Re: AT] Copy to clipboard
Posted by: AT
Posted on: 2003-03-23 10:20

谢谢!
我试试看

4.Re:如何实现 [Re: AT] Copy to clipboard
Posted by: floater
Posted on: 2003-03-25 02:03

You mean the "back" button?

If so, disable the "post" operation.

5.Re:如何实现 [Re: AT] Copy to clipboard
Posted by: AT
Posted on: 2003-03-27 21:54

楼上的朋友
不用POST是什么意思?
能详细一细吗?

6.Re:如何实现 [Re: AT] Copy to clipboard
Posted by: floater
Posted on: 2003-03-27 23:52

In html, form has two operations, get & post. If you don't want users to go back, you use post, e.g.,

<html>
<<two meta lines to make post working>>
...
<form ... method=post>

...

Now if you remove those two lines, you can still do post. And you can go back with your old data(The post is broken since you can view the old data).


   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923