clock  Mon - Sun 8.00 AM - 8.00 PM
mail  edu@teknowize.com
fb
instagram
play store
pinterest

How To Disable Right Click, Cut, Copy And Paste Using jQuery

  Sumit Dey Sarkar
  26 Aug 2022
  JQuery
Imperial Advance Hero Image

How To Disable Right Click, Cut, Copy And Paste Using jQuery

In this article we will learn how to disable right click, cut, copy and paste using jQuery.

Here we wil use context menu for disable mouse right click and also use bind event with cut copy paste oparation to disable cut copy paste using jQuery.

let's see the example - 

How to disable right click, cut, copy and paste using jQuery

<!DOCTYPE html>
<html>

<head>
  <title>How to disable right click, cut, copy and paste using jQuery</title>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
</head>

<body>

  <h1>How to disable right click, cut, copy and paste using jQuery</h1>

  <script>
    $(document).ready(function () {
      //Cut copy paste disable
      $(document).bind('cut copy paste', function (e) {
        e.preventDefault();
      });

      //Mouse right click disable
      $(document).on("contextmenu", function (e) {
        return false;
      });
    });
  </script>

</body>

</html>