How to load previous url in history list using javascript

Manideepgoud
Posted by Manideepgoud under JavaScript category on | Points: 40 | Views : 186
We use window.history.back()

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


It opens the previous url of the page which we have opened.

Comments or Responses

Login to post response