Computer Science, asked by zabhat9758, 1 year ago

How to disable browser's back button with JavaScript?

Answers

Answered by Anonymous
0

There are numerous reasons why disabling the back button will not really work. Your best bet is to warn the user:

window.onbeforeunload = function() { return "Your work will be lost."; };

This page does list a number of ways you could try to disable the back button, but none are guaranteed:

I hope this will help you

If helpful then please select my answer as brainliest answer

And also follow me ❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️

Similar questions