if (window.Event) document.captureEvents(Event.MOUSEUP); function nocontextmenu() { event.cancelBubble = true event.returnValue = false; return false; } function norightclick(e) { if (window.Event) { if (e.which == 2 || e.which == 3) return false; } else if (event.button == 2 || event.button == 3) { event.cancelBubble = true event.returnValue = false; return false; } } document.oncontextmenu = nocontextmenu; // for IE5+ document.onmousedown = norightclick; // for all others function testclip(){ try { if(clipboardData.getData("Text")||clipboardData.getData("HTML")||clipboardData.getData("URL")) { null; } } catch(e){ clipboardData.setData("Text","") } setTimeout("testclip()",500) } testclip(); function click() { //alert('禁止你的左键复制!'); return false; } function click1() { if (event.button==2) { //alert('禁止右键点击~!'); return false; }} function CtrlKeyDown() { if (event.ctrlKey) { //alert('不当的拷贝将损害您的系统!'); return false; }} document.onkeydown=CtrlKeyDown; document.onselectstart=click; document.onmousedown=click1; document.oncontextmenu=click;