Hello Dev,
Today, i we will show you how to stop f5 refresh button. This article will give you simple example of how to stop f5 refresh button. you will learn how to stop f5 refresh button. So let’s follow few step to create example of how to stop f5 refresh button.
<!DOCTYPE html> <html> <head> <title>How to Stop f5 refresh button</title> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script> </head> <body> <div class="container"> <h1>How to Stop f5 refresh button</h1> </div> <script type="text/javascript"> $(document).ready(function() { $(window).keydown(function(event){ if(event.keyCode == 116) { event.preventDefault(); return false; } }); }); </script> </body> </html>