如题  求屏蔽复制粘贴的JS 还有防止被人frame的
写了很久写不出
好心人来帮帮忙么?

解决方案 »

  1.   

    http://www.cnblogs.com/hyd309/archive/2009/07/03/1516173.html
      

  2.   


    <%@ page language="java" import="java.util.*" pageEncoding="GBK"%>
    <%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
    %><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
      <head>
        <base href="<%=basePath%>">
        
        <title>My JSP 'MyJsp.jsp' starting page</title>
        
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">    
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="This is my page">
    <!--
    <link rel="stylesheet" type="text/css" href="styles.css">
    -->
    <script type="text/javascript">
    document.oncontextmenu=function(){return   false;}//屏蔽右键菜单
    document.onpaste=function(){return   false;}//屏蔽粘贴
    document.oncopy=function(){return   false;}//屏蔽复制
    document.oncut=function(){return   false;}//屏蔽剪切
    document.onselectstart=function(){return   false;}//屏蔽选择



    </script>
      </head>
      
      <body  >
        This is my JSP page. <br>
      </body>
    </html>基于2楼网页,就是这样了。。
      

  3.   

    <head>
    <script language="javascript" type="text/javascript">document.oncontextmenu=function(){return   false;}//屏蔽右键菜单
    document.onpaste=function(){return   false;}//屏蔽粘贴
    document.oncopy=function(){return   false;}//屏蔽复制
    document.oncut=function(){return   false;}//屏蔽剪切
    document.onselectstart=function(){return   false;}//屏蔽选择
                  
    function a()
    {
     alert("123123");
    }
    </script>
    </head><html>
    <div>
    asdfadfasdfasdf
    <br/>
    ddddddddddd
    <br/>
    123132132132132132132132123
    </div>
    <a href="#" onclick="a()">aaa</a>
    </html>
      

  4.   


    是屏蔽了鼠标右键 但是ctrl+c  ctrl+v 还有ctrl+x还是可以用啊为什么啊
      

  5.   

    可以通过键盘事件来捕获,可以看一下event对象的一些操作(event.keyCode)