<script type="text/javascript">
document.onmousedown=function leftclick(){
if (event.button==1) {//2为右键
alert('你点击的是左键!');
}
}
</script>
document.onmousedown=function leftclick(){
if (event.button==1) {//2为右键
alert('你点击的是左键!');
}
}
</script>
{
if ((event.ctrlKey)&&(event.keyCode==65))
{
event.returnValue=false;
}
if(event.keyCode == 8)
{
event.keyCode = 0;
event.returnValue= false;
}
}<body onkeydown="_keydown();">屏蔽ctrl+a
document.oncopy=function() {return false;}
document.onselectstart=function() {return false;}
</script>总的来说,只能防君子,不能防“小人”
<!--
document.onmonusedown=function(){return false;}
//-->
</script>
---------------------------------------
我设计的服务器已经支持CGI了:
http://osdev.dec.cn:8080/gb1/index.pl
<body oncontextmenu="return false;" onselectstart="return false;">
这样在IE里确实是没有了右键菜单也不能选中, 可以我不能IE的下拉菜单->查看->源文件
里看你的源代码?
或者我装一个不支持 oncontextmenu 的浏览器(好象NS就不支持)这个方法就无效了.
{
var message = " 够 曰 的";
if(!document.rightClickDisabled) // initialize
{
if(document.layers)
{
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown = disableRightClick;
}
else document.oncontextmenu = disableRightClick;
return document.rightClickDisabled = true;
}
if(document.layers || (document.getElementById && !document.all))
{
if (e.which==2||e.which==3)
{
alert(message);
return false;
}
}
else
{
alert(message);
return false;
}
}
disableRightClick();</script>