I want to stop refresh the page in browser
- By using F5 key
- By using Rightclick mouse button
- By using Browser refresh button
Above first I got it in javascript but I need to disable the browser refresh button. I got it answer of first option by code.
function disableF5Btn(e) {
if ((e.which || e.keyCode) == 116)
e.preventDefault();
};
$(document).bind("keydown", disableF5Btn);
But now i am not able to do the 2nd and 3rd option.