Code
The code for saving prohibited webpages is:
<Noscript> <iframe src = "*. htm"> </iframe> </noscript>
Local ip address <% = request. servervariables ("remote_addr") %>
Server name <% = Request. ServerVariables ("SERVER_NAME") %>
Server IP <% = Request. ServerVariables ("LOCAL_ADDR") %>
Server port <% = Request. ServerVariables ("SERVER_PORT") %>
Code ASP that is prohibited from being cached on the webpage
<%
Response. Expires = 0
Response. ExpiresAbsolute = Now ()-1
Response. CacheControl = "no-cache"
%>
1. the right-click dialog box is completely blocked, and no shortcut menu is available.
<Body oncontextmenu = "window. event. returnvalue = false">
It can also be used in the Table framework of a webpage.
<Table border oncontextmenu = return (false)> <td> no </table>
2. Cancel selection and prevent Replication
<Body onselectstart = "return false">
3. Do not paste
<Body onpaste = "return false">
4. Prevent Replication
<Body oncopy = "return false;" oncut = "return false;">
5. Replace the IE icon in front of the address bar
<Link rel = "Shortcut Icon" href = "favicon. ico">
6. Your icons are displayed in favorites.
<Link rel = "Bookmark" href = "favicon. ico">
7. Disable the Input Method
<Input style = "ime-mode: disabled">
Note: This code is used when submitting a table. That is, other input methods cannot be used when data is input.
8. Always carry the framework
<Script language = "javascript"> <! --
If (window = top) top. location. href = "frames.htm"; // --> </script> 9. Prevent frame
<Script language = javascript> <! --
If (top. location! = Self. location) top. location = self. location;
// --> </SCRIPT>
<Input style = "ime-mode: disabled">
9. Check the source file
<Input type = button value = view webpage source code
Onclick = "window. location = 'view-source: '+ 'HTTP: // www.e3i5.com/test.htm';">
10. Block function keys Shift, Alt, Ctrl
<Script>
Function look (){
If (event. shiftKey)
Alert ("do not press Shift! "); // You can change it to ALT CTRL
}
Document. onkeydown = look;
</Script>
11. The cursor stops at the end of the text box.
<Script language = "java script">
Function cc ()
{
Var e = event. srcElement;
Var r = e. createTextRange ();
R. moveStart ("character", e. value. length );
R. collapse (true );
R. select ();
}
</Script>
<Input type = text name = text1 value = "123" onfocus = "cc ()">
Reprinted from: http://www.cnblogs.com/ZHF/articles/1407045.html