Home  >  Article  >  Web Front-end  >  Disabling page refresh makes the F5 shortcut key and right-click invalid_javascript skills

Disabling page refresh makes the F5 shortcut key and right-click invalid_javascript skills

WBOY
WBOYOriginal
2016-05-16 17:03:031310browse
Copy code The code is as follows:

/*Disable page refresh*/
document.onkeydown = function ()
{
if(event.keyCode==116) {
event.keyCode=0;
event.returnValue = false;
}
}
document. oncontextmenu = function() {event.returnValue = false;}
/* End*/
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn