
document.oncontextmenu=new Function("event.returnValue=false")//禁止右键功能,单击右键将无任何反应
document.onselectstart=new Function("event.returnValue=false")//禁止先择,也就是无法复制
</script>
<html><head>
<meta http-equiv="Content-Type" content="text/htmlcharset=gb2312">
<title>全面禁止鼠标右键、FX、Alt、Ctrl、Shift等</title>
</head>
<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 bgcolor="#000000" text="#666666" onkeydown="onKeyDown()" oncontextmenu="return false" onselectstart="return false" ondragstart="return false" >
<p>该页面禁止了鼠标右键,F5、F11、“应用程序”键,所有与alt、ctrl和shift有关的组合键(当然alt+f4和alt+home没有屏蔽),并且禁止了鼠标文本选择,你可以试试:)
够全了吧?</p>
<p></p>
</body>
</html>
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)