Use addEventListener instead of attachEvent(no longer supported).
http://msdn.microsoft.com/en-us/library/ie/ms536343%28v=vs.85%29.aspx[
^]
window.history.forward(1);
document.
addEventListener("keydown", my_onkeydown_handler);
function my_onkeydown_handler(e) {
switch (e.keyCode) {
case 116: // F5;
e.returnValue = false;
e.keyCode = 0;
window.status = "We have disabled F5";
break;
}
}