Features of ASP Language 1. Allows the use of VBScript or JavaScript simple script language and combined with HTML in the file;
2. No need to compile, is executed by WebServer;
3. Compatible with any ActiveX Script;
4.aSP Original Code Will not pass to the client, the client is displayed is the execution result.
Type:
;
text [ n] select>
text textarea>
Warning! body> noframe> No frame prompt; control framework content: can.
Use javascript: document.frame.strframename.location = "strsrc";
VBScript common functions:
1. Numerical function:
ABS (NUM): Return absolute value
SGN (NUM): NUM> 0 1; Num = 0 0; Num <0 -1; Judgment Numerical Positive Neighbor
HEX (NUM): Return to the hexadecimal value directly: & HXX max 8 digits
OCT (NUM): Return to the eight-input value directly: & oxx up to 8 digits
SQR (NUM): Returns square root NUM> 0
INT (NUM): Take INT (99.8) = 99; int (-99.2) = 100
FIX (NUM): Fix Fix (99.8) = 99; fix (-99.2) = 99
Round (Num, N): Self-consting volume Round (3.14159, 3) = 3.142 Numerical Value Roun is rounded for nuts to close Round (3.25, 1) = 3.2
Log (NUM): Take the logar of E is the end of Num> 0
Exp (N): Take E N times power usually used Num ^ N
SIN (NUM): Triangle function, calculated (angle * PAI) / 180 = radians Con (Num); at (NUM); ATN (NUM)
2. String function:
LEN (STR): Calculating string length Chinese character length is also one!
MID (Str, Start Character, [Reading Length]): Intercept string intermediate sub-string
Left (STR, NLEN): Intercept NLEN length sub string from the left
Right (STR, NLEN): Intercept NLEN length sub string from the right
LCASE (STR): String to lowercase
Ucase (STR): string to turn to uppercase
Trim (STR): Removes the space between the string
LTRIM (STR): Remove the left space of the string
RTRIM (STR): Remove the right space of the string string
Replace (Str, lookup string, alternative string, [start character, alternative, comparison method]): Replace the string
Note: Default: Start character 1; alternative number is not limited; the comparison method is case sensitive (0)
INSTR ([Start Character,] Str, Find String [, Compare Method]): Detects whether to include a sub-string optional parameter, you need to return to the starting position.
Instrrev (Str, Finding String [, Start Character] [, Comparison Method]): Reverse Detection Contains Subtringent Return Start Location
Space (n): constructs N space s strings
String (n, str): Constructs a string consisting of N Str first characters
Strreverse (STR): Reverse string
Split (STR, Split String [, Number] [, Comparison Method]): Split String Sign with String String to Character Array Optional Parameters
3. Data type conversion function:
CINT (STR): Convert positive TRUE-1; false 0; date distance 1899/12/31 days; time morning 0; afternoon 1;
CSTR (STR): Date Output Format YYYY / MM / DD; Time Output Format AM / PM HH: MM: SS
CLNG (STR): similar to CBool (NUM): NUM is not zero True; anti-False
CDATE (STR): Conversion Date Format 0: #AM 12: 00: 00 #; Date of Positive Distance 1899/12/31 Number of days; floating point Date Decimation
CBYTE (NUM): Num <255 Convert to byte
CSNG (STR): Convert to single precision value
CDBL (STR): Convert to double precision value
CCUR (STR): Convert to cash format
4. Time function:
Date: Take the current date of the system
Time: Take the current time
NOW: Take the current time and date value of the system DateTime type
Timer: Take the current time distance zero second value, timer, calculate time difference
DateAdd (interval, interval, date): estimate
Datediff (interval, date, date 2): Calculation time difference date 2 - date
DatePart (interval, date): interval value of the calculation date
DateSerial (Date): Output Date (calculated by sequence)
TimeSerial (Time): Output time value (calculated according to sequence)
DateValue (datetime): Remove the date value in the string
TimeValue (datetime): Remove the time value in the string
Weekday (date): Calculate the day of the week
MONTHNAME (date): Output monthly
Year (datetime): Intercepting the year
Month (datetime): Interception
Day (datetime): intercept the day
Hour (datetime): interceptions
Minute (datetime): intercept minute
Second (DateTime): Intercepting
5. Other functions:
Array (unit, ..): Dynamic Generate Array
ASC (STR): Output string first character of ASCII code
CHR (ASC): Convert ASCII as Character ENTER: CHR (13) & Chr (10)
Filter (Array Name, Key String, [, Compare] [, Comparison Method]):
Make a new array in the character string array (default) [contain] [contain] FALSE to take the element that does not contain
Join (arrayname): Connect the elements in the array into strings
Ubound (arrayname [, dimension]): acquiring the upper bounds of the array of corresponding dimensions
LBound (arrayname [, dimension]): The lower boundary of the corresponding dimension of the array is generally 0
Randmize N: Start random seed
RND (N): Number of random numbers, n> 0 or empty, sequences next random value, N = 0, N = 0, the same number is the same as the previous random value
Take the random positive number C between A and B, formula: c = int ((B-A 1) * RND A) Condition (B> a)
Subprogram and custom functions
Sub strsubname function strfunname (arg [1], ..)
Subprogramcore
EXIT SUB jumps out of the exit function in the middle of the exit function