1. oncontextmenu = "window. event. returnvalue = false" will completely block the right mouse button
<Table border oncontextmenu = return (false)> <td> no </table>
2. <body onselectstart = "return false"> cancel selection to prevent Replication
3. onpaste = "return false" Do not paste
4. oncopy = "return false;" oncut = "return false;" Prevent Replication
5. <link rel = "Shortcut Icon" href = "favicon. ico"> replace it with your own Icon in front of the IE Address Bar
6. <link rel = "Bookmark" href = "favicon. ico"> your Icons can be displayed in favorites.
7. <input style = "ime-modeisabled"> disable the input Method
8. Always carry the framework
<Script language = "javascript"> <! --
If (window = top) top. location. href = "frames.htm"; // frames.htm is the frame webpage.
// --> </Script>
9. Prevent frame
<Script language = javascript> <! --
If (top. location! = Self. location) top. location = self. location;
// --> </SCRIPT>
10. <noscript> <iframe src = *. html> </iframe> </noscript> webpages cannot be saved
11. <input type = button value = view webpage source code
Onclick = "window. location = 'view-source: '+ 'HTTP: // www.csdn.net/'";>
12. How to use asp to check whether the visitor has used an agent?
<% If Request. ServerVariables ("HTTP_X_FORWARDED_FOR") <> "then
Response. write "<font color = # FF0000> you have passed the proxy server ,"&_
"The real IP address is" & Request. ServerVariables ("HTTP_X_FORWARDED_FOR ")
End if
%>
13. Obtain the absolute position of the control
// Javascript
<Script language = "javascript">
Function getIE (e ){
Var t = e. offsetTop;
Var l = e. offsetLeft;
While (e = e. offsetParent ){
T + = e. offsetTop;
L + = e. offsetLeft;
}
Alert ("top =" + t +"
Left = "+ l );
}
</Script>
// VBScript
<Script language = "VBScript"> <! --
Function getIE ()
Dim t, l, a, B
Set a = document. all. img1
T = document. all. img1.offsetTop
L = document. all. img1.offsetLeft
While a. tagName <> "BODY"
Set a = a. offsetParent
T = t + a. offsetTop
L = l + a. offsetLeft
Wend
Msgbox "top =" & t & chr (13) & "left =" & l, 64, "Get control position"
End function
--> </Script>