Wednesday, 12 January 2022

Right click Disabled

 <html>

<head>

<script>

 status = "Right Click Disabled";

  document.onkeypress = function (event) {

        event = (event || window.event);

        if (event.keyCode == 123) {

           alert('No F-12');

            return false;

        }

    }

    document.onmousedown = function (event) {

        event = (event || window.event);

        if (event.keyCode == 123) {

            //alert('No F-keys');

            return false;

        }

        if(event.button == 2){

          alert(status);

          return false; 

        }

    }

    document.onkeydown = function (event) {

        event = (event || window.event);

        if (event.keyCode == 123) {

            //alert('No F-keys');

            return false;

        }

    }

</script>

</head>

<body>

</body>

</html>

No comments:

Post a Comment