How to create a "back" link

Asked

Viewed 158 times

1

I have the index page that collects some information she sends to herself. Then the user accesses a detail page, where on this page, I created a link called "back". However, when you return to the index page, the forms are all lost. I would like to know how to create a link that resumes the previous forms, in the same way as the "back" of the browsers.

1 answer

1


Try a link this way

<a href="#" onclick="history.go(-1); return false;">Link</a>
  • It is a good puzzle, but the ideal is for Nicolas to store the states of the forms whenever changing page, not to depend on the behavior of the browser.

  • How would that be, Bacco?

Browser other questions tagged

You are not signed in. Login or sign up in order to post.