Table processing.
<table style=TABLE-LAYOUT: fixed width=200 border=0 cellspacing=0 cellpadding=7 bgcolor=#f7f7f7>
<tr>
<td style=LEFT: 0px; WIDTH: 100%; WORD-WRAP: break-word>
dffadfdaqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqsfdffad
fdasfdffadfdasfdffadfdasfdffadfdasfdffadfdasfd
ffadfdasfdffadfdasfdffadfdasfdffadfdasf
</td>
</tr>
</table>
Here we mainly use css style for control. There is style=TABLE-LAYOUT: fixed in the <table> tag, and its description is as follows
grammar:
table-layout : auto | fixed
parameter:
auto: The default automatic algorithm. The layout will be based on the contents of each cell. The table will not be displayed until each cell is read and calculated. Very slow
fixed: Fixed layout algorithm. In this algorithm, the horizontal layout is only based on the width of the table, the width of the table border, the cell spacing, and the width of the columns, and has nothing to do with the content of the table. At this time, if there is no WORD-WRAP: break-word in the <td> tag, Style, the content in the table will only be displayed partially, depending on the width of the table. Word-wrap instructions are as follows:
grammar:
word-wrap : normal | break-word
parameter:
normal: Allow content to push beyond the specified container boundaries
break-word : Content will break within boundaries. If necessary, word-breaks also occur
VBSCRIPT tag index
Basic operations
+ Number addition and string concatenation
- Number subtraction
* Number multiplication
/Number division
Mod to find the remainder
Find the quotient
& string concatenation
^ power
= equal
<> Not equal
>= greater than or equal to
> Greater than
<= less than or equal to
< less than
Not
And
Or or
Xor
Loops and Decisions
if ....then if...then...
if...then...else if...then...not
else if... if not
select case... group selection condition
end select
for ... next counting loop
while...wend conditional loop (1)
do while...loop conditional loop (2)
do...loop while conditional loop (3)
do until...loop conditional loop (4)
do...loop until conditional loop (5)
mathematical functions
Abs absolute value
Sgn sign
Hex Convert to hexadecimal
Oct Convert to octal
Sqr square root
Int takes an integer
Fix takes an integer
Round takes an integer
Log base e logarithm
Sin sine function
Cos cosine function
Tan tangent function
String processing functions
Len string length
Mid takes part of the string
Left takes part of the string from the beginning of the string
Right takes part of the string from the end of the string
Lcase Convert to lowercase
Ucase convert to uppercase
Trim removes spaces at the beginning and end of a string
Ltrim removes spaces at the beginning of a string
Rtrim removes trailing spaces from strings
Replace replaces some characters in a string
Instr determines whether it is contained in another string (search from the beginning)
InstrRev determines whether it is contained in another string (search from the end)
Space space character of any number of characters
String Any character of any number of characters
StrReverse reverses a string
Split splits a string by a certain character
data type conversion function
Convert Cint to integer
Cstr converted to string
Clng Convert to constant integer
Cbool converted to Boolean function
Cdate convert to date function
CSng converted to single precision
CDbl converted to double precision
datetime function
Date Current date
Time now time
NOw current date and time
DateAdd adds date
DateDiff Two date difference
DateSerial date setting
DateValue date setting
Year Current year
Month Current month
Day now
Hour present time
Minute now minute
Second now second
Timer Number of seconds since midnight
TimeSerial time setting
TimeValue time part
WeekDay week name
MonthName month name
Other functions
Array produces an array
Asc character ASCII code
Chr ASCII code character
Filter filter array
InputBox input window
Join combines elements in an array
MsgBox information window
Lbound array lower bound
Ubound array upper bound
instruction
Const sets constant
Dim defines variables or arrays
Erase clears the array
ReDim redeclares an array
Randomize starting random number
Rnd gets random number
ASP object
Session object
IsEmpty tests whether the Session variable exists
TimeOut sets the Session variable life cycle
Abandon forcefully clears Session variables
Application object
IsEmpty tests whether the Application variable exists
Lock locks Application variables
Unlock Unlocks the Lock command
Cookies object
Expires sets the lifetime of Cookies variables
Connection object
Open opens a connection to the database
Execute opens the Recordset object
Close Closes the Connection object
Recordset object
movefirst moves the record pointer to the first record
movelast moves the record pointer to the last record
movenext moves the record pointer to the next record
moveprevious moves the record pointer to the previous record
bof tests whether it is the beginning of the recordset
eof tests whether it is the end of recordset
open opens the Recoreset object
close closes the recordset object
fields sub-object for reading data
fileds.count number of fields
pagesize Number of records per page
absolutepage is set to a certain page
pagecount total number of pages
Absoluteposition jumps directly to a record
MicrosoftVBscript runtime error list (decimal representation)
error #5 Invalid procedure call or argument
error #5 Invalid procedure call or argument
error #6 overflow
error #7 Not enough memory
error # 9 subscript out of bounds
error # 10 The array is fixed-length or temporarily locked
error # 11 division by zero
error #13 type mismatch
error # 14 Insufficient string space
error #17 Unable to perform required operation
error #28 stack overflow
error #35 Undefined procedure or function
error #48 Error loading DLL
error #51 Internal error
error #52 Wrong file name or number
error #53 File not found
error #54 Wrong file mode
error #55 The file is already open
error #57 Device I/O error
error #58 File already exists
error #61 Disk is full
error #62 Input exceeds end of file
error #67 Too many files
error #68 Device not available
error #70 No permission
error #71 Disk not ready
error #74 Rename cannot have other drive symbols
error #75 path/file access error
error #76 Path not found
error #91 Object variable not set
error #92 For loop not initialized
error #94 Invalid use of Null
error #322 Unable to create necessary temporary files
error #424 Missing object
error #429 ActiveX component cannot create object
error #430 The class does not support Automation operations
error # 432 The file name or class name was not found in the Automation operation
error #438 The object does not support this property or method
error # 440 Automation operation error
error #445 The object does not support this operation
error #446 Object does not support named parameters
error #447 Object does not support current locale options
error #448 Named parameter not found
error #449 Parameter is required
error # 450 Wrong number of parameters or invalid parameter attribute value
error #451 Object is not a collection
error #453 The specified DLL function was not found
error #455 code resource lock error
error #457 This key is already associated with an element of this collection
error #458 The variable uses an Automation type that is not supported in VBScript.
error #462 The remote server does not exist or is unavailable
error # 481 Invalid image
error #500 variable is not defined
error #501 illegal assignment
error #502 The object is not safe to program with Script
error #503 Object cannot be initialized safely
error #504 Object cannot be created safely
error #505 Invalid or unqualified reference
error #506 Class not defined
error #507 An unexpected error occurred
error # 1001 Not enough memory
error # 1002 syntax error
error # 1003 Missing ':'
error # 1005 Missing '('
error # 1006 Missing ')'
error # 1007 Missing ']'
error #1010 Missing identifier
error # 1011 Missing '='
error # 1012 Missing 'If'
error # 1013 Missing 'To'
error # 1014 Missing 'End'
error # 1015 Missing 'Function'
error # 1016 Missing 'Sub'
error # 1017 Missing 'Then'
error # 1018 Missing 'Wend'
error # 1019 Missing 'Loop'
error # 1020 'Next' missing
error # 1021 Missing 'Case'
error # 1022 Missing 'Select'
error #1023 Missing expression
error # 1024 Missing statement
error # 1025 statement not ended
error # 1026 Missing integer constant
error # 1027 Missing 'While' or 'Until'
error # 1028 'While' and 'Until' are missing or the statement is not ended
error #1029 Missing 'With'
error # 1030 Identifier is too long
error # 1031 Invalid number
error # 1032 invalid character
error # 1033 unterminated string constant
error # 1034 Comment not ended
error # 1037 Invalid use of 'Me' keyword
error # 1038 'loop' statement is missing 'do'
error # 1039 Invalid 'exit' statement
error # 1040 Loop control variable 'for' is invalid
error # 1041 Name redefinition
error #1042 must be the first statement in the line
error # 1043 Cannot assign a value to a non-ByVal parameter
error #1044 Parentheses cannot be used when calling a subroutine
error # 1045 Missing literal constant
error # 1046 Missing 'In'
error # 1047 Missing 'Class'
error #1048 must be defined inside a class
error #1049 Missing Let, Set or Get in property declaration
error # 1050 'Property' is missing
error # 1051 The number of variables must be consistent in the specification of all properties
error # 1052 Multiple default properties/methods are not allowed in a class
error # 1053 The class initialization or termination procedure has no variables
error #1054 The set or let attribute must have at least one variable
error # 1055 Wrong 'Next'
error # 1056 'Default' can only be specified in 'Property', 'Function' or 'Sub'
error # 1057 When specifying 'Default', 'Public' must also be specified.
error # 1058 'Default' can only be specified in Property Get
error #4096 Microsoft VBScript compiler error
error #4097 Microsoft VBScript runtime error
error #5016 Missing regular expression object
error #5017 Regular expression syntax error
error # 5018 wrong quantifier
error #5019 ']' is missing in regular expression
error #5020 ')' is missing in the regular expression
error #5021 Character set out of bounds
Tree menu:
<SCRIPT language=JavaScript>
var lastObj
function expandIt(obj)
{
if(lastObj != null)
{
if(obj == lastObj)
{
if(obj.style.display == none)
{
obj.style.display = ;
}
else
{
obj.style.display = none
}
}
else
{
lastObj.style.display = none;
obj.style.display = ;
}
}
else
{
obj.style.display = ;
}
lastObj = obj
}
</SCRIPT>
<table width=100% border=0 cellspacing=0 cellpadding=0>
<%
dimid
id = request(id)
dim strsql,rs
strsql=select * from p_type where slanguage=1 and typelevel=1 order by typename
set rs=fgetrslist(strsql)
do while not rs.eof
%>
<tr>
<td height=25 class=LEFTLINKS><img width=30 height=0 align=absmiddle /><b><%if rs(isleaf)=0 then%><a href=# onClick=javascript:expandIt(kb< %=rs(id)%>);return false><%else%><a href=<%=request.ServerVariables(SCRIPT_NAME)%>?idtree=<%=rs(idtree)%> ><%end if%><%=server.HTMLEncode(right((rs(typename)&),len(rs(typename)&)-2))%></a></b></td>
</tr>
<%
IF clng(id)=clng(rs(id)) then
%>
<tr id=kb<%=rs(id)%>>
<%
else
%>
<tr id=kb<%=rs(id)%> style=display:none;>
<%
end if
%>
<td>
<table>
<%
dimrs1
strsql=select * from p_type where parentid=&rs(id)& and slanguage=1 order by typename
set rs1=fgetrslist(strsql)
do while not rs1.eof
%>
<tr><td height=20 class=LEFTLINKS>
<img width=40 height=0 align=absmiddle /><a href=<%=request.ServerVariables(SCRIPT_NAME)%>?idtree=<%=rs1(idtree)%>&id=<%=rs(id)% > ><%=server.HTMLEncode(right((rs1(typename)&),len(rs1(typename)&)-2))%></a></td></tr>
<%
rs1.movenext
loop
rs1.close
set rs1=nothing
%>
</table>
</td>
</tr>
<%
rs.movenext
loop
rs.close
set rs=nothing
%>
</table>