如题,求给出代码.

解决方案 »

  1.   

    function rightClick()
    {
    //你的程序
    return false;
    }
    document.oncontextmenu = rightClick;
      

  2.   

    <script> 
    function onKeyDown() 

    if ((event.keyCode==116)||(window.event.ctrlKey)||(window.event.shiftKey)||(event.keyCode==122)) 

    event.keyCode=0; 
    event.returnValue=false; 


    </script> <script> 
    function yxl() { 
    if(window.event.altKey) 

    window.event.returnValue=false; 


    document.onkeydown=yxl 
    </script>
    <body bgcolor="#000000" text="#666666" onkeydown="onKeyDown()" oncontextmenu="return false" onselectstart="return false" ondragstart="return false" > 
    <p></p> 
    <p>< /p> 
    <p></p> 
    </body> 
      

  3.   

    <scrupt>
    function drag()
    {return false;}
    document.ondragstart=drag 
    function stopmouse(e) 

    if (navigator.appName == 'Netscape' && (e.which == 3 || e.which == 2))  
     return false; 
    else if  
    (navigator.appName == 'Microsoft Internet Explorer' && (event.button == 2 || event.button == 3)) {  
      alert("不得使用右键!   :)");
    return false;  
      }
    return true; 
       } 
    document.onmousedown=stopmouse;  
    if (document.layers) 
    window.captureEvents(Event.MOUSEDOWN); 
    window.onmousedown=stopmouse;   </SCRIPT>
      

  4.   

    <body oncontextmenu='window.event.returnValue=false'>
      

  5.   

    <body onContexMenu="return false" onSelectStart="return false">