1. Get system time:
<% = NOW ()%>
2. Available in IP:
<% = Request.ServerVariables ("remote_host")%>
3. Get system, browser version:
Window.Document.write ("Version:" Navigator.Appname Navigator.AppVersion "Browser.")
script>
4. Remove the IE mixing bar:
5. Enter the website and jump out of your advertisement:
WINDOW.OPEN (''
Http://www.xxxxxx.com'''''''', ''Height=200, Width=300 ,tOp=0 ,le=30');
// ->
6. Random:
<% randomize%>
<% = (int (RND () * n) 1)%>
N is a changeable number
7. Mixed code:
height = "207" bgcolor = "# FFFF00"> hhhhhhhhhhhhhhhhhhh marquee> 8. Automatically turn off the webpage: Settimeout ('' window.close (); '', 1000); // 60 seconds after close // -> script> Automatically shut down after 10 seconds this page, please note the refresh page p> 9. Random background music: <% randomize%> You can modify the number, limit the number of calls, I am 60 here. 10. Automatically refresh this page: Var limit = "0:10" IF (Document.Images) { Var parselimit = limited.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 "Take" CURSEC "after retransmate this page!" Else Curtime = CURSEC "After the second, turn on this page!" WINDOW.STATUS = CURTIME SetTimeout ("BeginRefresh ()", 1000) } } Window.οnlοad = beginRefresh File: // -> script> 11. Access database connection: <% Option expedition DIM Startime, EndTime, Conn, Connstr, DB Startime = Timer () 'Change the 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 uses an older version access driver, use the following connection method. 'Connstr = "Driver = {Microsoft Access Driver (* .mdb)}; dbq =" & Server.mappath (dB) Conn.open connStr Function CloseDatabase Conn.close Set conn = Nothing END FUNCTION %> 12.sql database connection: <% Option expedition 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 web code with the keyboard: Function CTlent (EVENTOBJECT) { IF ((Event.ctrlKey && Window.Event.Keycode == 13) || (Event.altKey && Window.Event.Keycode == 83)))))) { WINDOW.OPEN ('URL', '', '') } } script> Here is Ctrl Enter and Alt S code yourself to check the ASCII code of the keyboard and change it! 14. Let the layer are not covered by the control: Object> div> # Object> div> # > td> tr> table> iframe> div> Codebase = " http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5, 0, 0 0 "width =" 468 "Height =" 60 "> Value = high> PLUGINSPAGE = " http://www.macromedia.com/shockwave/download/index.cgi? P1_PROD_VERSION = ShockWaveFlash "; type =" Application / X-ShockWave-Flash "width =" 468 " HEIGHT = "60"> Embed> Object> 16.vbs pop-up window small code: Msgbox "You have not registered or log in to the forum", "0", "boutique forum" Location.href = "login.asp" script> 16. Use FSO to modify file-specific contents 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 END FUNCTION 17. Use the FSO to read the function of the file content Function fsofileread (filename) Dim objfso, ObjcountFile, FileTempdata Set objfso = server.createObject ("scripting.filesystemObject") Set objcountfile = objfso.opentextfile (server.mappath (filename), 1, true) FsofileRead = ObjcountFile.Readall ObjcountFile.Close Set objcountfile = Nothing Set objfso = Nothing END FUNCTION 18. Use the FSO to read the function of a line of files Function FsolineDit (filename, linenum) IF Linenum <1 THEN EXIT FUNCTION DIM FSO, F, TEMPARRAY, TEMPCNT SET FSO = Server.createObject ("scripting.filesystemObject") IF not fso.fileexists (server.mappath (filename)) THEN EXIT FUNCTION Set f = fso.opentextfile (server.mappath (filename), 1) IF not f.atendofstream Then Tempcnt = f.readall f.close Set f = Nothing Temparray = Split (Tempcnt, Chr (13) & chr (10)) If Linenum> Ubound (Temparray) 1 THEN EXIT FUNCTION Else FSOLinedit = Temparray (LINENUM-1) END IF END IF END FUNCTION 19. Use the FSO to write a function of a row Function FsolineWrite (FileName, Linenum, LineContent) IF Linenum <1 THEN EXIT FUNCTION DIM FSO, F, TEMPARRAY, TEMPCNT SET FSO = Server.createObject ("scripting.filesystemObject") IF not fso.fileexists (server.mappath (filename)) THEN EXIT FUNCTION Set f = fso.opentextfile (server.mappath (filename), 1) IF not f.atendofstream Then Tempcnt = f.readall F.closeTemParray = Split (Tempcnt, Chr (13) & chr (10)) If Linenum> Ubound (Temparray) 1 THEN EXIT FUNCTION Else Temparray (LINENUM-1) = linecontent END IF Tempcnt = JOIN (Temparray, Chr (13) & chr (10)) Set f = fso.createtextfile (server.mappath (filename), true) F.Write Tempcnt END IF f.close Set f = Nothing END FUNCTION 20. Use the FSO to add a function of new rows Function FsoAppline (filename, linecontent) DIM FSO, F SET FSO = Server.createObject ("scripting.filesystemObject") IF not fso.fileexists (server.mappath (filename)) THEN EXIT FUNCTION Set f = fso.opentextfile (server.mappath (filename), 8, 1) F.Write Chr (13) & chr (10) & linecontent f.close Set f = Nothing END FUNCTION 21. Function of the last line of reading the file Function fsolastline (filename) DIM FSO, F, TEMPARRAY, TEMPCNT SET FSO = Server.createObject ("scripting.filesystemObject") IF not fso.fileexists (server.mappath (filename)) THEN EXIT FUNCTION Set f = fso.opentextfile (server.mappath (filename), 1) IF not f.atendofstream Then Tempcnt = f.readall f.close Set f = Nothing Temparray = Split (Tempcnt, Chr (13) & chr (10)) Fsolastline = Temparray (Ubound (TempaRay)) END IF END FUNCTION 转载请注明原文地址:https://www.9cbs.com/read-48831.html9cbsNew Post(0)
height = "207" bgcolor = "# FFFF00"> hhhhhhhhhhhhhhhhhhh marquee>
8. Automatically turn off the webpage:
Settimeout ('' window.close (); '', 1000); // 60 seconds after close
Automatically shut down after 10 seconds this page, please note the refresh page p>
9. Random background music:
You can modify the number, limit the number of calls, I am 60 here.
10. Automatically refresh this page:
Var limit = "0:10"
IF (Document.Images) {
Var parselimit = limited.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 "Take" CURSEC "after retransmate this page!"
Else
Curtime = CURSEC "After the second, turn on this page!"
WINDOW.STATUS = CURTIME
SetTimeout ("BeginRefresh ()", 1000)
Window.οnlοad = beginRefresh
File: // ->
11. Access database connection:
<%
Option expedition
DIM Startime, EndTime, Conn, Connstr, DB
Startime = Timer ()
'Change the 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 uses an older version access driver, use the following connection method.
'Connstr = "Driver = {Microsoft Access Driver (* .mdb)}; dbq =" & Server.mappath (dB)
Conn.open connStr
Function CloseDatabase
Conn.close
Set conn = Nothing
END FUNCTION
%>
12.sql database connection:
Connstr = "driver = {SQL Server}; server = hudenq-n11t33nb; uid = sa; pwd = xsfeihu; database = dvbbs"
13. Open the web code with the keyboard:
Function CTlent (EVENTOBJECT)
{
IF ((Event.ctrlKey && Window.Event.Keycode == 13) || (Event.altKey && Window.Event.Keycode == 83))))))
WINDOW.OPEN ('URL', '', '')
Here is Ctrl Enter and Alt S code yourself to check the ASCII code of the keyboard and change it!
14. Let the layer are not covered by the control:
> td> tr> table> iframe> div>
Codebase = "
http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5, 0, 0
0 "width =" 468 "Height =" 60 ">
Value = high> PLUGINSPAGE = " http://www.macromedia.com/shockwave/download/index.cgi? P1_PROD_VERSION = ShockWaveFlash "; type =" Application / X-ShockWave-Flash "width =" 468 " HEIGHT = "60"> Embed> Object> 16.vbs pop-up window small code: Msgbox "You have not registered or log in to the forum", "0", "boutique forum" Location.href = "login.asp" script> 16. Use FSO to modify file-specific contents 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 END FUNCTION 17. Use the FSO to read the function of the file content Function fsofileread (filename) Dim objfso, ObjcountFile, FileTempdata Set objfso = server.createObject ("scripting.filesystemObject") Set objcountfile = objfso.opentextfile (server.mappath (filename), 1, true) FsofileRead = ObjcountFile.Readall ObjcountFile.Close Set objcountfile = Nothing Set objfso = Nothing END FUNCTION 18. Use the FSO to read the function of a line of files Function FsolineDit (filename, linenum) IF Linenum <1 THEN EXIT FUNCTION DIM FSO, F, TEMPARRAY, TEMPCNT SET FSO = Server.createObject ("scripting.filesystemObject") IF not fso.fileexists (server.mappath (filename)) THEN EXIT FUNCTION Set f = fso.opentextfile (server.mappath (filename), 1) IF not f.atendofstream Then Tempcnt = f.readall f.close Set f = Nothing Temparray = Split (Tempcnt, Chr (13) & chr (10)) If Linenum> Ubound (Temparray) 1 THEN EXIT FUNCTION Else FSOLinedit = Temparray (LINENUM-1) END IF END IF END FUNCTION 19. Use the FSO to write a function of a row Function FsolineWrite (FileName, Linenum, LineContent) IF Linenum <1 THEN EXIT FUNCTION DIM FSO, F, TEMPARRAY, TEMPCNT SET FSO = Server.createObject ("scripting.filesystemObject") IF not fso.fileexists (server.mappath (filename)) THEN EXIT FUNCTION Set f = fso.opentextfile (server.mappath (filename), 1) IF not f.atendofstream Then Tempcnt = f.readall F.closeTemParray = Split (Tempcnt, Chr (13) & chr (10)) If Linenum> Ubound (Temparray) 1 THEN EXIT FUNCTION Else Temparray (LINENUM-1) = linecontent END IF Tempcnt = JOIN (Temparray, Chr (13) & chr (10)) Set f = fso.createtextfile (server.mappath (filename), true) F.Write Tempcnt END IF f.close Set f = Nothing END FUNCTION 20. Use the FSO to add a function of new rows Function FsoAppline (filename, linecontent) DIM FSO, F SET FSO = Server.createObject ("scripting.filesystemObject") IF not fso.fileexists (server.mappath (filename)) THEN EXIT FUNCTION Set f = fso.opentextfile (server.mappath (filename), 8, 1) F.Write Chr (13) & chr (10) & linecontent f.close Set f = Nothing END FUNCTION 21. Function of the last line of reading the file Function fsolastline (filename) DIM FSO, F, TEMPARRAY, TEMPCNT SET FSO = Server.createObject ("scripting.filesystemObject") IF not fso.fileexists (server.mappath (filename)) THEN EXIT FUNCTION Set f = fso.opentextfile (server.mappath (filename), 1) IF not f.atendofstream Then Tempcnt = f.readall f.close Set f = Nothing Temparray = Split (Tempcnt, Chr (13) & chr (10)) Fsolastline = Temparray (Ubound (TempaRay)) END IF END FUNCTION
PLUGINSPAGE = "
http://www.macromedia.com/shockwave/download/index.cgi?
P1_PROD_VERSION = ShockWaveFlash "; type =" Application / X-ShockWave-Flash "width =" 468 "
HEIGHT = "60"> Embed> Object>
16.vbs pop-up window small code:
Msgbox "You have not registered or log in to the forum", "0", "boutique forum"
Location.href = "login.asp"
16. Use FSO to modify file-specific contents
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
Set objcountfile = Nothing
Set objfso = Nothing
17. Use the FSO to read the function of the file content
Function fsofileread (filename)
Set objcountfile = objfso.opentextfile (server.mappath (filename), 1, true)
FsofileRead = ObjcountFile.Readall
18. Use the FSO to read the function of a line of files
Function FsolineDit (filename, linenum)
IF Linenum <1 THEN EXIT FUNCTION
DIM FSO, F, TEMPARRAY, TEMPCNT
SET FSO = Server.createObject ("scripting.filesystemObject")
IF not fso.fileexists (server.mappath (filename)) THEN EXIT FUNCTION
Set f = fso.opentextfile (server.mappath (filename), 1)
IF not f.atendofstream Then
Tempcnt = f.readall
f.close
Set f = Nothing
Temparray = Split (Tempcnt, Chr (13) & chr (10))
If Linenum> Ubound (Temparray) 1 THEN
EXIT FUNCTION
FSOLinedit = Temparray (LINENUM-1)
END IF
19. Use the FSO to write a function of a row
Function FsolineWrite (FileName, Linenum, LineContent)
F.closeTemParray = Split (Tempcnt, Chr (13) & chr (10))
Temparray (LINENUM-1) = linecontent
Tempcnt = JOIN (Temparray, Chr (13) & chr (10))
Set f = fso.createtextfile (server.mappath (filename), true)
F.Write Tempcnt
20. Use the FSO to add a function of new rows
Function FsoAppline (filename, linecontent)
DIM FSO, F
Set f = fso.opentextfile (server.mappath (filename), 8, 1)
F.Write Chr (13) & chr (10) & linecontent
21. Function of the last line of reading the file
Function fsolastline (filename)
Fsolastline = Temparray (Ubound (TempaRay))