Date and Time operations:
VaR d = new date ();
VaR d = new date (, 5); // The time is
D. getfullyear (); year
D. getmonth (); month (normal-1)
D. getdate (); Day
D. getday (); day of the week
D. gethours ();
D. getminutes ();
D. getseconds ();
Mathematical function operations:
Math. Ceil ();
Math. Floor ();
Math. Round ();
Math. Random ();
Math. SQRT ();
Form Verification:
1. Non-empty verification (remove space)
2. Comparison and verification: Compare with a value
3. Range verification: Based on the range
4. fixed format verification: such as phone number, ID card number ......
Regular Expression
5. Other Verification
Regular Expression
Syntax form var A =/regular expression content /;
^ -- Match the beginning
$ -- Matching end
\ D -- any number
\ W -- a person's number or letter
{N} -- repeat the expression on the left n times
{M, n} -- repeat the expression on the left M ~ N times
{M ,}-- repeat the expression on the left at least m times, not limited
+ -- The expression on the left appears at least once, but not limited to {1 ,}
* -- The expression on the left must appear at least 0 times, but not limited to {0 ,}
? -- The expression on the left appears at least 0 times, at most 1 time, equivalent to {0, 1}
[A, B, c] -- only one of the brackets can be taken.
[A-Z] or [0-9] -- Take 1 in the range
| -- Or
() -- Priority
\ -- Escape
140926 ● Date and Time operations, mathematical function operations, Form Verification