ASP is an abbreviation for Active Server page, meaning "dynamic servers pages." ASP is an application developed by Microsoft to replace the CGI script program, it can interact with database and other programs, it is a simple and convenient programming tool. The following is a summary of the code that is often used by ASPs.
1. Access to System time:
2. Access to the IP:
3. Access to the system, browser version:
<script>
window.document.write ("version:" +navigator.appname+navigator.appversion+ "browser.")
4. Remove IE Mixing strips:
<body scroll= "No" >
or
<body style= "Overflow-y:hidden" >
5. Go to the website and jump out of the advertisement:
<script language= "JavaScript" >
<!--
<!--Notice to change the path where the file is located-->
window.open (' http://www. Xxxxxx.com ', ', ' height=200,width=300,top=0,left=30 ');
-->
</script>
6. Random Number:
<%randomize%>
<%= (int (rnd () *n) +1)%>
N is a number that can be changed
7. Scroll up the code:
<marquee direction= "Up" scrolldelay= "
style=" font-size:9pt; color: #FF0000; line-height:150% : italic; Font-weight:bold "
scrollamount=" 2 "width=" 206 "height=" 207 "bgcolor=" #FFFF00 ">hhhhhhhhhhhhhhhhhhh</ Marquee>
8. Automatically close the Web page:
<script language= "JavaScript" >
<!--
settimeout (' Window.close (); ', 10000);//60 seconds to close
//-->
</script>
<p align= "center" > This page automatically closes after 10 seconds, please note refresh page </p>
9. Random background music:
<%randomize%>
<bgsound src= "mids/<%= (int (rnd () *60) +1)%>.mid" loop= "-1" >
Can modify the number, limit the number of calls, I am here 60.
10. Automatically refresh this page:
<script>
<!--
var limit= "0:10"
if (document.images) {
var parselimit=limit.split (":")
parselimit=parselimit[0]*60+parselimit[1]*1
}
function Beginrefresh () {
if (!document.images)
return
if (parselimit==1)
window.location.reload ()
else{
parselimit-=1
curmin=math.floor (parselimit/60)
cursec=parselimit%60
if ( curmin!=0)
curtime=curmin+ "+cursec+" seconds after the brush this page! "
else
curtime=cursec+" seconds to brush this page! "
window.status=curtime
settimeout (" Beginrefresh () ", 1000)
}
}
window.onload= Beginrefresh
file://-->
</script>
This is the ASP commonly used source code of the previous article, the next article for everyone to recommend the necessary additional 12 common source code.