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 ***></object></div> # Front
<div Z-index:1><object ***></object></div> # behind
<div Id=&qu
[1] [2] [3] [4] [5] [6] Next page