How to prohibit pasting, copying, dragging, etc._html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:14:45
Original
1350 people have browsed it

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

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template