Monday, 16 July 2018

Disable Cut, Copy & Paste on page using jquery

///////////
http://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js

//////////////JS


    <script type="text/javascript">
          $(document).ready(function () {
              // Prevent full page
              $('body').bind('cut copy paste', function (e) {
                  e.preventDefault();
              });

              //Prevent particular part of the page
              $('#Control-id').bind('cut copy paste', function (e) {
                  e.preventDefault();
              });
          });
</script>

No comments:

Post a Comment

How to highlight selected text in notepad++

  –> To highlight a block of code in Notepad++, please do the following steps step-1  :- Select the required text. step-2  :- Right click...