miro

如何用用javascript 禁止右键,禁止复制,禁止粘贴,做站时常会用到这些代码,所以收藏了一下!

1. oncontextmenu="window.event.returnValue=false" 将彻底屏蔽鼠标右键特效
<table border oncontextmenu=return(false)><td>no</table> 可用于Table

2. <body onselectstart="return false"> 取消选取、防止复制 javascript技巧

3. onpaste="return false" 不准粘贴技巧

4. oncopy="return false;" oncut="return false;" 防止复制的javascirpt特效

 

另一种

=======================================================

<body  
oncontextmenu=\'return false\'
ondragstart=\'return false\'
onselectstart =\'return false\'
onselect=\'document.selection.empty()\'
oncopy=\'document.selection.empty()\'
onbeforecopy=\'return false\'
onmouseup=\'document.selection.empty()\'>

分类:

技术点:

相关文章: