简体   繁体   English

返回用户历史记录中的URL

[英]Go back to URL in user's history

I have a couple of forms that are on 6 different pages (step by step). 我有几个表格分别位于6个不同的页面上(逐步介绍)。 Users chosen information is saved and echoed at the top of the page in "sessions", but I want the user to be able to edit any information that was set... I have tried using history.back() however it's not an option for me. 用户选择的信息已保存并在“会话”页面的顶部回显,但我希望用户能够编辑已设置的任何信息...我尝试使用history.back()但是这不是一个选择为了我。 So I decided to have a try with linking history URL. 因此,我决定尝试链接历史记录URL。 What I mean is something like this: 我的意思是这样的:

echo "<td id='1'><a href='javascript:history.back(' url here  ')' id='stext' style='text-decoration:none';>" . $str  ."</a></td>";   

It was unsuccessful... 没成功...

Please give me some suggestions:) 请给我一些建议:)
Thanks:) 谢谢:)

Don't you mean history.go(-1); 您的意思不是history.go(-1); But then again i would make regular urls to the corresponding steps: 但是再一次,我将对相应的步骤进行常规的URL:

<a href="?step=1">back to step 1</a> 2 <a href="?step=3">forward to step 3</a>

(that last one shoud be a submit button in your situation? or for that matter the first one should be a button too, so the current answers in your page will be saved when you go back to the previous page) (根据您的情况,最后一个应该是“提交”按钮吗?或者,第一个也应该是一个按钮,因此当您返回上一页时,页面中的当前答案将被保存)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM