"Disable right click, Inspect Element and page source"
Bootstrap 4.1.1 Snippet by subhash4web

<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <!------ Include the above in your HEAD tag ----------> <!DOCTYPE html> <html> <body oncontextmenu="return false;"> <div class="container"> <div class="jumbotron text-center"> <h4>Disable Ctrl + U, Right click, F12, and Ctrl+ Shift + J </h4> <p>Disable right click, Inspect Element and page source using JavaScript in Html </p> </div> </div> </body> </html>
body{ background: #4b66e7; } .jumbotron{ margin-top:30px;}
document.onkeydown = function(e) { if(event.keyCode == 123) { return false; } if(e.ctrlKey && e.shiftKey && e.keyCode == 'I'.charCodeAt(0)){ return false; } if(e.ctrlKey && e.shiftKey && e.keyCode == 'J'.charCodeAt(0)){ return false; } if(e.ctrlKey && e.keyCode == 'U'.charCodeAt(0)){ return false; } }

Related: See More


Questions / Comments: