JavaScript technology often used in BS development

xiaoxiao2021-03-06  72

First, verification class

1, digital verification

1.1 integer

1.2 Entarity of greater than 0 (for verification of IDs)

1.3 Verification of negative integers

1.4 integers cannot be greater than IMAX

1.5 integers cannot be less than IMIN

2, time class

2.1 short, shaped (13:04:06)

2.2 Short Date, Shape (2003-12-05)

2.3 Long-term, shaped (2003-12-05 13:04:06)

2.4 Only year and month. Shape (2003-05, or 2003-5)

2.5 Only hours and minutes, like (12:03)

3, form class

3.1 All forms of the form cannot be empty

3.2 Multi-line text boxes cannot be empty.

3.3 Multi-line text boxes can not exceed SmaxStrleng

3.4 Multi-line text boxes cannot be less than SMIXStrleng

3.5 Judging whether the radio box is selected.

3.6 Judging whether the check box is selected.

3.7 All selection of checkbox, multi-selection, full number, reverse

3.8 During the file upload process, judgment file type

4, character class

4.1 The judgment character consists of a letter from A-Z or A-Z.

4.2 Judgment Character consists of letters and numbers.

4.3 Judgment Character consists of letters and numbers, underscores, and points. And the beginning of the underscore and letters

4.4 String replacement function.Replace ();

5, browser class

5.1 Judging the type of browser

5.2 Judging the version of IE

5.3 Judging the resolution of the client

6, combined class

6.1 Judgment of Email.

6.2 Verification of mobile phone number

6.3 verification of ID card

Second, the function

1. Time and related control classes 1.1 Calendar 1.2 Time Control 13,000 Years 1.4 Display Dynamic Display Clock Effect (text, such as OA Mid Time) 1.5 Display Dynamic Display Clock Effect (Image, Like Watch) 2, Table Class 2.1 Automatic Generation Form 2.2 Dynamic Add, modify, delete elements in the drop-down box 2.3 can enter the drop-down box 2.4 Multi-line text box in multiple lines of text boxes. If you are more input, you will automatically reduce the iMAX text (more for SMS send) 3, print class 3.1 Print Control 4, Event class 4.1 Mask Right click 4.2 Shield all function keys 4.3 -> and <- f5 f11, f9, f1 4.4 Shielding a combination of Ctrl N5, web design class 5.1 Continuous scrolling text, picture (note is continuous, no blank appearance in two words and pictures) 5.2 HTML Edit Control class 5.3 color selection box control 5.4 drop-down menu 5.5 two floors Or multi-level drop-down menu 5.6 Imitation IE menu. (Effects, such as rongshuxa.com's navigation section) 5.7 status bar, the dynamic effect of the Title column (there are many examples, you can study) 5.8 After double-click, the web page automatically scrolls 6, the tree structure. 6.1 ASP SQL version 6.2 ASP XML SQL version 6.3 Java SQL or Java SQL XML7, borderless effect 8, "Dynamic drop-down frame technology 9, text sort

I. Verification class 1, digital verification 1.1 integer / ^ (-|/ ) 1.2 greater than 0 integers (used for ID authentication) / ^ / D $ / .test (STR) 1.3 negative integer verification / ^-/d //.test (STR) 2, time class 2.1 short time, shaped (13:04:06) Function istime (str) {var A = STR. Match (/ ^ (/ d {1, 2}) (:)? (/ d {1, 2}) / 2 (/ d {1, 2}) $ /); if (a == null) {Alert ('Enter parameters are not time format'); return false;} if (a [1]> 24 || a [3]> 60 || a [4]> 60) {Alert ("time format is not pair"); Return true;} 2.2 Short date, shaped (2003-12-05) Function strdatetime (STR) {var r = str.match (/ ^ (/ D {1, 4}) (- | //) (/ D {1, 2}) / 2 (/ d {1, 2}) $ /); if (r == null) Return False; var D = new date (r [1], r [3] - 1, R [4]); return (d.Getfullyear () == r [1] && (D.getMonth () 1) == r [3] && d.getdate () == r [4]); } 2.3 long, shaped (2003-12-05 13:04:06) Function strdatetime (STR) {var REG = / ^ (/ d {1, 4}) (- | //) (//) (/ D {1 2}) / 2 (/ d {1, 2}): (/ d {1, 2}): (/ d {1, 2}) $ /; var r = Str.match (reg); if (r == null) Return False; var D = ne W Date (R [1], R [3] -1, R [4], R [5], R [6], R [7]); return (d.Getfullyear () == r [1] && (D.GETMONTH () 1) == r [3] && D.getdate () == r [4] && D.GetHours () == R [5] && D.getminutes () == r [6] && D. Getseconds () == r [7]);} 2.4 only year and month. If (2003-05, or 2003-5) 2.5 is only hours and minutes, shaped (12:03) 3, the value of all forms of the form cannot be empty 4.2 Judgment character consists of letters and numbers.

3.7 Collection of check boxes, multi-selection, unlike, reverse selection

>