In this article, we will learn how to disable the back button in the browser using JavaScript.
Open the index.html file and add the code in it.
<!DOCTYPE html> <html> <head> <script> history.pushState(null, null, location.href); window.onpopstate = function () { history.go(1); }; </script> </head> <body> Welcome </body> </html>
That’s it.
Output:
Also, check Detect Inactivity In Browser Using JavaScript
In this article, we have to show Create and Used PIPE in angular
In this article, we have to show Create and Used PIPE in angular
In this article, we have to show Create and Used PIPE in angular
View Comments
thank you bro, you save my day
You're welcome :)