admin管理员组

文章数量:1026174

I have looked everywhere and found nothing. I am not sure if it is possible, but I need a back button after a form has been posted in html. It is a hotel search and the client does not want the parameters set as GET. Does anyone have any idea how I can acplish this in html, php, javascript or jquery? Thanks in advance for any help!

I have looked everywhere and found nothing. I am not sure if it is possible, but I need a back button after a form has been posted in html. It is a hotel search and the client does not want the parameters set as GET. Does anyone have any idea how I can acplish this in html, php, javascript or jquery? Thanks in advance for any help!

Share Improve this question asked Nov 17, 2012 at 2:22 luv2codeluv2code 1,2966 gold badges24 silver badges42 bronze badges 1
  • Use the javascript history.back() mand, tied to a button? – Tim Dearborn Commented Nov 17, 2012 at 2:26
Add a ment  | 

4 Answers 4

Reset to default 3

The most secure would be php,

<a href="<?php echo $_SERVER['HTTP_REFERER'];?>">back</a>

JavaScript can be disabled a times :)

Just make the button change the location of the window to the location of the form.

You should use : $_SERVER['HTTP_REFERER'] in your page, or create a session.

have you try this?

it brings you back to the previously loaded webpage.

<A HREF="javascript:javascript:history.go(-1)">Back</A>

I have looked everywhere and found nothing. I am not sure if it is possible, but I need a back button after a form has been posted in html. It is a hotel search and the client does not want the parameters set as GET. Does anyone have any idea how I can acplish this in html, php, javascript or jquery? Thanks in advance for any help!

I have looked everywhere and found nothing. I am not sure if it is possible, but I need a back button after a form has been posted in html. It is a hotel search and the client does not want the parameters set as GET. Does anyone have any idea how I can acplish this in html, php, javascript or jquery? Thanks in advance for any help!

Share Improve this question asked Nov 17, 2012 at 2:22 luv2codeluv2code 1,2966 gold badges24 silver badges42 bronze badges 1
  • Use the javascript history.back() mand, tied to a button? – Tim Dearborn Commented Nov 17, 2012 at 2:26
Add a ment  | 

4 Answers 4

Reset to default 3

The most secure would be php,

<a href="<?php echo $_SERVER['HTTP_REFERER'];?>">back</a>

JavaScript can be disabled a times :)

Just make the button change the location of the window to the location of the form.

You should use : $_SERVER['HTTP_REFERER'] in your page, or create a session.

have you try this?

it brings you back to the previously loaded webpage.

<A HREF="javascript:javascript:history.go(-1)">Back</A>

本文标签: phpBack button after form submitStack Overflow