


How to prohibit pasting, copying, dragging, etc._html/css_WEB-ITnose
Jun 24, 2016 pm 12:14 PM <BODY oncontextmenu="return false" onselectstart="return false"
ondragstart="return false" onbeforecopy="return false" oncopy=document.selection.empty() onselect=document.selection.empty( )>
The site is developed using asp.net.
What I want is global settings for the entire site, not adding them one by one like the above, because there are too many pages.
Please advise.
Reply to discussion (solution)
No way, even if you write it into an external JS file, you still need to add it page by page.
Is there really no other way? Please help. If it is a common js file, how should I write it?
For the code, please refer to: http://blog.csdn.net/liushengmz/article/details/4093185
A stupid way, do you have a common JS file for all your pages? File similar to jquery.js? If so, paste the JS code below, which will set up "Disable pasting, copying and dragging" on every page.
Write it in a public method or js file, and execute it every time the page loads

Hot Article

Hot tools Tags

Hot Article

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Difficulty in updating caching of official account web pages: How to avoid the old cache affecting the user experience after version update?

How do I use HTML5 form validation attributes to validate user input?

How to efficiently add stroke effects to PNG images on web pages?

What is the purpose of the <iframe> tag? What are the security considerations when using it?

What are the security implications of using iframes, and how can I mitigate them?

What are the best practices for cross-browser compatibility in HTML5?

How do I use the HTML5 <time> element to represent dates and times semantically?

How do I use the HTML5 <meter> element to display numerical data within a range?
