如何屏蔽“ctrl+v”和“右键的粘贴功能”??

 所属目录:Java   |   类型:技术问答   |   时间:2007-05-21
 问题:

当用户按ctrl+v或者右键粘贴时,没反应或者提示“粘贴请登录”  
  js能实现这样的功能吗?

· 网友精彩回答:

发表者:applebomb

针对ie可以。屏蔽右键和ctrl+v就ok

发表者:matrixy

抢分来也。。  
   
  啊哈哈。。。。。。。。。  
   
  <body   oncut="return   false;"   oncopy="return   false;"   onpaste="return   false;"></body>  
   
  绑定这三个事件就是。。

发表者:applebomb

<html>  
    <script>  
  function   keydown(){   //屏蔽鼠标右键、ctrl+n、shift+f10、f5刷新、退格键  
      if   ((event.ctrlkey)&&(event.keycode==86))       //屏蔽   ctrl+v  
      {  
        alert("不能粘贴喔^_^");  
            event.keycode=0;  
            event.returnvalue=false;  
      }  
  }  
    </script>  
    <head>  
      <meta   http-equiv="content-language"   content="zh-cn">  
      <meta   http-equiv="content-type"   content="text/html;   charset=gb2312">  
      <title>键盘代码</title>  
      <style>  
        <!--  
  body                   {   font-family:   verdana;   color:   #000080;   font-size:   9pt   }  
  --></style>  
    </head>  
    <body   onkeydown="keydown()"   oncontextmenu="event.returnvalue=false">  
      <p   align="center">请按键盘  
          <input   type="text"   name="textfield">  
      </p>  
    </body>  
  </html>  
 

.
处理 SSI 文件时出错
© 2006-2008 All Rights Reserved