不能点右键、不能用CTRL+A、不能复制
经验与学习 2009/12/28 11:13:44 点击:不统计
只需在页面的<body>中加入下面几句即可:
<body oncontextmenu="window.event.returnValue=false"
onkeypress="window.event.returnValue=false"
onkeydown="window.event.returnValue=false"
onkeyup="window.event.returnValue=false"
ondragstart="window.event.returnValue=false"
onselectstart="event.returnValue=false">
注:这些设置只对某一部分浏览器起作用,还有在部分浏览器下虽然页面进行了这些设置但是仍然能点击右键,能用CTRL+A、能复制,例如Firefox。
查看例子:不能点右键、不能复制、不能用Ctrl+A
·上一篇:电脑常用的组合键 >> ·下一篇:浅谈Xhtml >>