一些頁面的卡控,請看備註說明:
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 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | //--------防列印 document.write( '<style type="text/css" media="print"><!--body{display:none}--></style>' ); //-------- //--------清狀態列 function clearstatus() { var openobj = window; if ( typeof (window.dialogArguments) == "object" ) { openobj = window.dialogArguments; } openobj.status = "" ; setTimeout( "clearstatus()" , 100 )}hp_nls(); //-------- //--------清剪貼簿 (只清圖,不清文) window.onload = function () { clearclip(); } function clearclip() { try { if (clipboardData.getData( "Text" ) || clipboardData.getData( "HTML" ) || clipboardData.getData( "URL" )) { null ; } } catch (e) { clipboardData.setData( "Text" , "" ); } setTimeout( "clearclip()" , 500 );} //防右鍵選單 document.oncontextmenu = function () { return false ; } //防內容選取 document.onselectstart = function () { return false ; } //鎖key document.onkeydown = function () { LockKeys(); } function LockKeys() { try { //鎖Alt + <- / -> if ((window.event.altKey) && (window.event.keyCode == 37 || window.event.keyCode == 39 )) { alert( '禁止往返網頁!' ); event.returnValue = false ; } //鎖ctrl-p 防列印 //鎖ctrl-n 防開新視窗 //鎖ctrl-o 防輸入url //if( ( window.event.keyCode == 80 || window.event.keyCode == 78 )) if (window.event.ctrlKey && ((window.event.keyCode == 80 ) || (window.event.keyCode == 78 ) || (window.event.keyCode == 79 ))) { event.keyCode = 0 ; event.returnValue = false ; } //鎖alt //若不在編輯區,鎖後退鍵防回前頁 //鎖ctrl-r 防重新整理 //鎖F11 網頁全畫面看到url //鎖F5 防重新整理 if ((event.altKey) || ((event.keyCode == 8 ) && (event.srcElement.type != "text" && event.srcElement.type != "textarea" && event.srcElement.type != "password" )) || ((event.ctrlKey) && ((event.keyCode == 82 ))) || (event.keyCode == 122 ) || (event.keyCode == 116 )) { event.keyCode = 0 ; event.returnValue = false ; } //鎖ctrl-c , ctrl-v if ( window.event.ctrlKey && ((window.event.keyCode== 67 )||(window.event.keyCode== 86 )) ) { event.keyCode = 0 ; event.returnValue = false ; } } catch (e) {}} |