In the process of developing the website sometimes we do not want to let the customer see the source code of the page, even the text content on the page does not want to be copied, let's look at how to protect the page contentPrevent viewing of page source code and copying text from pagesWe all know that even if you set the Disable right button but click F12 stil
JS code disables the replication feature:
Copy Code code as follows:
Note that this code must be placed behind the body element, in front or in the head without any effect.
Complement: Document.body.onselectstart page check function.
Document.body.oncontextmenu page Right menu.
Document.body.on
In some cases, what we write is not copied by others. how can we implement it in code? The following small series will introduce you to the javascript code to easily prohibit the copying of webpage content. if you are interested, let's take a look at the following code, which is very simple and easy to prohibit the copying of webpage content.
Sometimes we need
At the same time suitable for IE, Firefox, Google browser to apply, after the filter code is as follows:
Copy Code code as follows:
Disable right key, text selection, copy key
$ (document). Bind ("ContextMenu", function () {return false;});
$ (document). Bind ("Selectstart", function () {return false;});
Disabled
The code is as follows
Copy Code
To disable a button with ID btn:$ ("#btn"). attr ({"Disabled": "Disabled"});Or$ ("#btn"). attr ("Disabled", "disabled");Cancel Disabled:$ ("#btn"). Removeattr ("Disabled");Or$ ("#btn"). attr ("Disabled", "");
readonlyC
code i
Reprinted to Http://community.csdn.net/Expert/topic/4881/4881882.xml
Copy Code code as follows:
Const Ssfcontrols = 3
Sconnectionname = "Local Area Connection" can be changed to the name of the connection you want to control, such as "Wireless network Connection"
Senableverb = "enabled (a)"
Sdisableverb = "Disabled (b)" XP system should be "inactive (b)"
Set Shellapp = CreateObject ("
attributes.
Prohibit directly in the browser
The Code is as follows:
Copy code
Disable page caching in asp.net
Server
The Code is as follows:
Copy code
Response. Buffer = true;Response. ExpiresAbsolute = DateTime. Now.
How does phpcmsv9 disable the front-end and back-end login verification codes? Delete the following code? Phpcmsmodulesmemberindex. php ?? Search for the following four lines of code: determining the verification code ??? $ Codeisset ($ _ POST [code]) amp; trim ($ _ POST [
1. Disable the mouse key code/prohibit page check/prohibit Save As/anti-copy codePress CTRL + C to copy the codePress CTRL + C to copy the code2. Disable the left and right mouse button1 3. Disable the Check code1 4. Prohibit Save As1 5. Anti-copy/copy code1 6. Disable text
Method 1: Disable USB by modifying the Registry
Principle: you only need to change the Start value in the HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ services \ USBSTOR path of the Registry to 4 to disable USB (default: 3, that is, allow USB ).
Advantage: simple and easy to use.
Disadvantage: everyone on Earth knows it and it is easy to recognize it.
Suggestion: Use a timer or create a thread to lock
The following example shows that the result is no overload display submission.
when the user selects an option, a function is called "getvote ()" execution. The "onclick" event that is raised by this feature
Copy Code code as follows:
Yes:
the Getvote () function does the following:
Create an XMLHttpRequest object
Create the function to being execute
A project was submitted last week (used internally), together with a bug, said to disable the BACKSPACE key (BACKSPACE or call Back button), because this and his habits are not the same, fearing that if the text input half, he pressed the backspace key, the whole page of the content of white filled, Then vowed to say that he did the system back key is not used, I have a problem with this system, because of many things, only to record the problem, and
How to completely disable viewing webpage source code
Web page makers often encounter situations where specially crafted Javascript effects are copied by others, but they are helpless. Is there a way to solve this problem? Server-side programming technologies such as ASP and JSP can be used to protect the source code of web pages. However, the free personal homep
There are special requirements in some special projects, such as the need to disable specific lines. At this time the general properties of Gridcontrol are not implemented, and some changes need to be made. At this time you need to go to devexpress official website to find some information (official website https://www.devexpress.com), this case from the official website reference.1. Disable a specific line
Method One: Use the server-side Response.Redirect method when navigating, or use the front-end to get Window.location.replace method.
Method Two: Disable ASP.net page caching.
I still recommend method two when necessary. Because we do not have the development of control browser settings. If the user set IE to never check the update cache problem is not easy to avoid, so still use method two, let IE temporary folder does not exist paging file.
Also,
Android disabled logs
During development, we often output various logs to debug code. However, when the application publishes an apk, it does not want to output logs.
Disable output logs such as Log. v (), Log. I (), Log. w (), Log. v (), and Log. e ().Principle:
Then we can use proguard to delete various log output codes. Then, the log code will be filtered out
Method 1: Disable USB by modifying the Registry
Principle:You only need to change the start value in the HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ usbstor path to 4 to disable USB (3 by default ).
Advantages:Easy to use.
Disadvantages:Everyone on Earth knows that it is easy to understand.
Suggestion:Use a timer or create a thread to lock this value.
ProgramCode:
Using M
Disable F5 to refresh the jquery instance code:F5 has the ability to refresh the Web page, you may sometimes need to disable this feature, and here's a code example to explain how to implement this feature.The code is as follows:$ (document). Ready (function() { $ (document). Bind ("KeyDown",function(e) { var e=
The following error occurred during vs debugging:
[Plain]View PlainCopyprint?
When the following module is generated, optimizations or no debug information are enabled:
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP. files\...\*. Dll
To debug this module, change its project build configuration to debug mode. To suppress this message, disable the "Warn at startup if no user code
The following example shows that the result is no reload display and submission.
When you select an option, a function is called "getVote ()" for execution. "OnClick" event caused by this function
Copy codeThe Code is as follows:
Yes:
The getVote () function does the following:Create an XMLHttpRequest objectCreate the function to be executed when the server response is readySend the request off to a file on the serverNotice that a parameter (vote) i
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.