js禁止右击与选择内容
<script>
function onKeyDown()
{
if ((event.keyCode==116)||(window.event.ctrlKey)||(window.event.shiftKey)||(event.keyCode==122))
{
event.keyCode=0;
event.returnValue=false;
}
}
</script>
<script>
function yxl() {
if(window.event.altKey)
{
window.event.returnValue=false;
}
}
document.onkeydown=yxl
</script>
<body onkeydown="onKeyDown()" oncontextmenu="return false" onselectstart="return false" ondragstart="return false">
原创:转请注明www.111cn.net
|