1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
| function document.oncontextmenu() { event.returnValue = false; } function window.onhelp() { return false; } function document.onkeydown() { if ((window.event.altKey) && ((window.event.keyCode == 37) || (window.event.keyCode == 39))) { alert("不准你使用ALT+方向键前进或后退网页!"); event.returnValue = false; } if ((event.keyCode == 8) || (event.keyCode == 116) || (event.ctrlKey && event.keyCode == 82)) { event.keyCode = 0; event.returnValue = false; } if (event.keyCode == 122) { event.keyCode = 0; event.returnValue = false; } if (event.ctrlKey && event.keyCode == 78) { event.returnValue = false; } if (event.shiftKey && event.keyCode == 121) { event.returnValue = false; } if (window.event.srcElement.tagName == "A" && window.event.shiftKey) { window.event.returnValue = false; } if ((window.event.altKey) && (window.event.keyCode == 115)) { window.showModelessDialog("about:blank", "", "dialogWidth:1px;dialogheight:1px"); return false; } }
|