Snap Builder Public Codes Library
Snap | Generators | Login | Browse | Search | Enter Code | Export Snap Builder Public Codes Library

 

Category: Javascript Codes Library >> Navigation / Menus >> Simple Back Button


Code Snippet </> Info


Snippet Name: Simple Back Button

Description: Press a button to return the user to the previous page.


Compatible Browsers:
Chrome BrowserFirefox BrowserInternet Explorer BrowserOpera BrowserSafari Browser

Note:

Author: SnapBuilder <snippets@snapbuilder.com>

Last Modified: 2015-03-19 19:47:49

Language: javascript

Highlight Mode: javascript

Copy Codes: Use Free Notepad ++
Bookmark and Share

Snap HTML Code Editor:
Paste the source code, make changes and instantly see it in live preview.
Snap HTML Code Editor


  About Copying
Copied To Clipboard!

<html> <head> <title>Simple Back Button - Javascript Code Snippet</title> </head> <body> <p>Just like your browser's back button, the following script allows the user to press a button to returns the user to the previous page.</p> <p>In the body of your document, add the following code snippet where you want the button or link to appear:</p> <p>A form button code<br /> <form><input type="Button" value="Previous Page" onClick="history.go(-1)"></form></p> <p>A text link code<br /> <a href="javascript:history.back(1)">Previous Page</a></p> <br /><br /> <div id="snippet"> [ This code example from <a href="http://snapbuilder.com/code_snippets/copy_code_snippet_41.html">Simple Back Button</a> page. ] </div> </body> </html>


[ Snippet Options ]

 

© 2002 -  Snap Builder Public Codes Library