Disable Copy Paste And Mouse Right Click JavaScript, jQuery
Here is the code we can use to Disable Right Mouse Click Using jQuery:
<script type="text/javascript">
$(document).ready(function () {
//Disable full page
$("body").on("contextmenu",function(e){
return false;
});
//Disable part of page
$("#id").on("contextmenu",function(e){
return false;
});
});
</script>
Disable Cut, Copy, Paste Using jQuery:
<script type="text/javascript">
$(document).ready(function () {
//Disable full page
$('body').bind('cut copy paste', function (e) {
e.preventDefault();
});
//Disable part of page
$('#id').bind('cut copy paste', function (e) {
e.preventDefault();
});
});
</script>
Hope this will help!
Comments
Post a Comment