Beginner 1. Get system time:
<%=now ()%>
2. Access to the IP:
<%=request.servervariables ("Remote_host")%>
3. Access to the system, browser version:
<script>
Window.document.write ("Version:" +navigator.appname+navigator.appversion+ "browser.")
</script>
4. Remove IE Mixing strips:
<body scroll= "No" >
<body style= "Overflow-y:hidden" >
5. Go to the website and jump out of the advertisement:
<script language= "JavaScript" >
<!--
<!--note change the path to the file-->
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. Move Up code:
<marquee direction= "Up" scrolldelay= "style=" FONT-SIZE:9PT; Color: #FF0000; line-height:150%; Font-style: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); Shut down in 60 seconds.
-->
</script>
<p align= "Center" > this page closes automatically 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 later to brush this page!" "
Window.status=curtime
SetTimeout ("Beginrefresh ()", 1000)
}
}
Window.onload=beginrefresh
File://-->
</script>
11.ACCESS Database connection:
<%
Option Explicit
Dim startime,endtime,conn,connstr,db
Startime=timer ()
' Change database name
db= "Data/dvbbs5.mdb"
Set conn = Server.CreateObject ("ADODB. Connection ")
Connstr= "Provider=Microsoft.Jet.OLEDB.4.0;Data source=" & Server.MapPath (DB)
' If your server is powered by an older version of Access, use the following connection method
' connstr= ' Driver={microsoft Access driver (*.mdb)};d bq= "& Server.MapPath (DB)
Conn. Open ConnStr
function CloseDatabase
Conn.close
Set conn = Nothing
End Function
%>
12.SQL Database connection:
<%
Option Explicit
Dim startime,endtime,conn,connstr,db
Startime=timer ()
Connstr= "Driver={sql Server};server=hudenq-n11t33nb;uid=sa;pwd=xsfeihu;database=dvbbs"
Set conn = Server.CreateObject ("ADODB. Connection ")
Conn. Open ConnStr
function CloseDatabase
Conn.close
Set conn = Nothing
End Function
%>
13. Open the page code with the keyboard:
<script language= "JavaScript" >
function Ctlent (eventobject)
{
if ((Event.ctrlkey && window.event.keycode==13) | | (Event.altkey && window.event.keycode==83))
{
window.open (' url ', ', ', ')
}
}
</script>
This is Ctrl+enter and Alt+s's code. Check the ASCII code of the keyboard and change it.
14. Let the layer not be covered by the control code:
<div Z-index:2><object xxx></object></div> # Front
<div Z-index:1><object xxx></object></div> # behind
<div id= "Layer2" style= "Position:absolute; top:40;width:400px; Height:95px;z-index:2 "><table height=100% width=100% bgcolor=" #ff0000 "><tr><td height=100% 100%></td></tr></table><iframe width=0 height=0></iframe></div>
<div id= "Layer1" style= "Position:absolute; top:50;width:200px; Height:115px;z-index:1 "><iframe height=100% width=100%></iframe></div>
15. Dynamic Network Flash Advertising code:
<object classid= "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase= "http://download.macromedia.com/pub/ shockwave/cabs/flash/swflash.cab#version=5,0,0,0 "width=" 468 "height=" ><param Name=movie "value=" yj16d.swf "><param name=quality value=high><embed src=" http://www.163design.net/a/y/images/ dvbanner.swf "Quality=high pluginspage=" http://www.macromedia.com/shockwave/download/index.cgi? P1_prod_version=shockwaveflash ";;;;;;;;;;;; Type= "Application/x-shockwave-flash" width= "468" height= "></embed></object>"
16.VBS pop-up window Small code:
<script language=vbscript>
MsgBox "You haven't registered or landed forum", "0", "Boutique Forum"
Location.href = "Login.asp"
</script>
16. Functions to modify file-specific content using the FSO
function Fsochange (filename,target,string)
Dim Objfso,objcountfile,filetempdata
Set objFSO = Server.CreateObject ("Scripting.FileSystemObject")
Set objcountfile = objFSO.OpenTextFile (Server.MapPath (filename), 1,true)
Filetempdata = Objcountfile.readall
Objcountfile.close
Filetempdata=replace (filetempdata,target,string)
Set objcountfile=objfso.createtextfile (Server.MapPath (filename), True)
Objcountfile.write Filetempdata
Objcountfile.close
Set objcountfile=nothing
Set objFSO = Nothing
E