A
Andrew Poulos
I'm working on an app where the refreshing of the window by pressing the
F5 key needs to be suppressed. I thought it would be straightforward but
I can't get it to work. This is the code I'm currently trying:
okdh = function(e) {
if (e.which == 116) e.preventDefault();
}
document.addEventListener("keydown", okdh, false);
e.which returns a number
e.which returns 116 when the F5 key is pressed
e.cancelable is true when the F5 key is pressed
Is the default action of the F5 key something that can be suppressed?
Andrew Poulos
F5 key needs to be suppressed. I thought it would be straightforward but
I can't get it to work. This is the code I'm currently trying:
okdh = function(e) {
if (e.which == 116) e.preventDefault();
}
document.addEventListener("keydown", okdh, false);
e.which returns a number
e.which returns 116 when the F5 key is pressed
e.cancelable is true when the F5 key is pressed
Is the default action of the F5 key something that can be suppressed?
Andrew Poulos