<button onclick="myFunction()">Go Back</button> <script> function myFunction() { window.history.back(); } </script>