history.back()

We can use history.back() method to go one step back. history.back() mimics the browser Back button.

 
<!DOCTYPE HTML> 
<html> 
    <head> 
        <title>Example</title> 
    </head> 
    <body> 
        <script type="text/javascript"> 
             //go back one page 
             window.history.back(); 
        </script> 
    </body> 
</html>
  
Click to view the demo
Home 
  JavaScript Book 
    DOM  

History:
  1. The History Object
  2. history.back()
  3. history.forward()
  4. history.go(url/number)
  5. history.length
  6. history.pushState:Adding an Entry to the Browser History