Click here to Skip to main content
15,917,455 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi EveryBuddy

i Need a Java Script For Disable Refresh Button And F5 ,
Thank you -
Posted

1 solution

To disable F5

C#
document.attachEvent("onkeydown", my_onkeydown_handler);
        function my_onkeydown_handler() {
            switch (event.keyCode) {
                case 116: // 'F5'
                    event.returnValue = false;
                    event.keyCode = 0;
                    window.status = "We have disabled F5";
                        break;
            }
        }
 
Share this answer
 
Comments
sriman.ch 23-Nov-11 3:56am    
If my post helped you give it a rating so that I can improve

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900