ASP 32 Essence Code (1)

Source: Internet
Author: User
Tags servervariables

ASP 32 Extract Code (1) 2009-08-10 09:53:03 www.hackbase.com Source: Internet 1. Oncontextmenu= "Window.event.returnvalue=false" will completely shield the right mouse button <table border Oncontextmenu=return (false) &GT;&LT;TD >no</table> is available for table 2.   <body onselectstart= "return false" > Cancel ... 1. oncontextmenu= "Window.event.returnvalue=false" will completely shield the right mouse button
<table border Oncontextmenu=return (false) ><td>no</table> available for table
2. <body onselectstart= "return false" > deselect, prevent copying
3. onpaste= "return false" no paste
4. oncopy= "return false;" oncut= "return false;" Prevent replication
5. <link rel= "Shortcut icon" href= "Favicon.ico" > IE Address bar before switching to their own icon
6. <link rel= "Bookmark" href= "Favicon.ico" > can display your icon in the Favorites folder
How to make this site homepage
You may have noticed that there is now a link on the home page of many websites "Click here to set this site as the homepage" (Here the homepage refers to the browser's start page).
Not only the big ISP,ICP to do so, some personal homepage also launched this "service" to recruit netizens, specifically how to achieve this function? Let me analyze it for you:
Clicking on that hyperlink will show you the download of a file named Lspace.reg, and then double-click it to change your registry, and then when you open the browser, the start page changes. (a change in the registration form, many netizens are more "scared", will not break the windows.) )
Don't be afraid, let's open the Lspace.reg to see (open with the most common Notepad Notepad) and find the following:
  
REGEDIT4
[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main]
"Start page" = "http://www.aygame.com/";
[Hkey_current_user\software\netscape\netscape Navigator\main] "Home page" = "http://www.aygame.com/";
  
The original is two, the first set of IE Star page, the second set the NC's home page (no flower head Oh:). The URL that follows is your homepage's URL!
7. <input style= "ime-modeisabled" > Close IME
8. Always with frame
  
<script language= "* * *" ><!--
if (window = = top) Top.location.href = "frames.htm"; Frames.htm for frames page
--></script>
  
9. Prevent people from being frame
<script language=****><!--
if (top.location! = self.location) top.location=self.location;
--></script>
<noscript><iframe src=*.html></iframe></noscript> Web page will not be saved as
<input type=button value= View Web page source code
onclick= "window.location = ' view-source: ' + '" Target=_blank __designer:dtid= "11794787648667917" >http:// www.csdn.net/& #39; " >
12. How to check whether the visitor uses the agent by means of ASP
<% if Request.ServerVariables ("Http_x_forwarded_for") <> "then
Response.Write "<font color= #FF0000 > You passed the proxy server," & _
"Real IP is" &request.servervariables ("Http_x_forwarded_for")
End If
%>
13. Get the absolute position of the control
//****
<script language= "* * *" >
function Getie (e) {
var t=e.offsettop;
var l=e.offsetleft;
while (e=e.offsetparent) {
T+=e.offsettop;
L+=e.offsetleft;
}
Alert ("top=" +t+ "\nleft=" +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=" &AMP;T&AMP;CHR (& "left=" &l,64, "get control position"
End Function
--></script>
14. The cursor is stopped at the end of text in the textbox
<script language= "* * *" >
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 ()" >
  
15. Determine the origin of the previous page
Asp:
Request.ServerVariables ("Http_referer")
  
****:
Document.referrer
  
16. Minimize, maximize, close the window
  
<object id=hh1 classid= "Clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11" >
 

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.