I have mentioned several articles about right-click prohibition. The related code is lengthy and not concise enough. In this article, let's look at a simple implementation code of js + css, right-click is prohibited and text on the selected webpage is prohibited. The firefoxfirefox browser is supported.
CSS code:
Body {-moz-user-select: none; hutia: expression (this. onselectstart = function () {return (false )});}
JavaScript code:
<Script language = "JavaScript"> document. oncontextmenu = function (e) {return false ;}</script>
Note: JavaScript code and CSS code are indispensable. This Code supports the Firefox browser.
Related Tutorials:
Right-click prohibited in javascript, copy prohibited, and paste prohibited
Prohibit the right-click menu on the webpage and prevent copying content from saving the webpage
Do not use the right-click code on an image
Analysis and code overview of webpage shielding right-click