Creating a HTML back button.

Issue

Creating a HTML back button.

Solution

It may be necessary to direct a visitor back to a page the page that directed them to the page they are currently reading. For example, this is a great feature to add to any error page to help get the visitor back to a working page easier.

Copy and paste the below source code to add this button.

<FORM><INPUT TYPE="button" VALUE="Back" onClick="history.go(-1);return true;"></FORM>

In the above code the -1 tells the browser to go back one page.

Example

  • Category
  • HTML Q&A
  • Related pages
  • HTML Help
  • Solved?
  • Were you able to locate the answer to your question?