Home >
Article > Web Front-end > JavaScript technology often used in b/s development_javascript skills
JavaScript technology often used in b/s development_javascript skills
WBOYOriginal
2016-05-16 19:27:07927browse
1. Verification category 1. Within digital verification 1.1 Integer 1.2 Integer greater than 0 (used for verification of passed ID) 1.3 Verification of negative integer 1.4 Integer cannot be greater than iMax 1.5 The integer cannot be less than iMin 2. Time class 2.1 Short time, in the form of (13:04:06) 2.2 Short date, in the form of (2003-12-05) 2.3 Long time, in the shape of (2003-12-05 13:04:06) 2.4 Only year and month. In the form of (2003-05, or 2003-5) 2.5 Only hours and minutes, in the form of (12:03) 3. Form class 3.1 All form values cannot be empty 3.2 The value of the multi-line text box cannot be empty. 3.3 The value of the multi-line text box cannot exceed sMaxStrleng 3.4 The value of the multi-line text box cannot be less than sMixStrleng 3.5 Determine whether the radio button is selected. 3.6 Determine whether the check box is selected. 3.7 Select all check boxes, multiple selections, unselect all, inverse selection 3.8 Determine the file type during file uploading 4. Character type 4.1 The judgment characters are all composed of letters from a-Z or A-Z 4.2 The judgment characters are composed of letters and numbers. 4.3 Judgment characters are composed of letters, numbers, underscores, and dots. The beginning can only be an underscore and a letter 4.4 String replacement function.Replace(); 5. Browser class 5.1 Determine the browser type 5.2 Determine the ie version 5.3 Determine the resolution of the client
6. Combined class 6.1 Determine email. 6.2 Verification of mobile phone number 6.3 Verification of ID card
2. Functional category
1. Time and related controls 1.1 Calendar 1.2 Time control 1.3 Perpetual calendar 1.4 Display dynamic display clock effect (text, such as time in OA) 1.5 Display dynamic display clock effect (image, like watch) 2. Form class 2.1 Automatically generate forms 2.2 Dynamically add, modify, and delete elements in the drop-down box 2.3 Drop-down box where content can be entered 2.4 Only iMax text can be entered in the multi-line text box. If you input too much, it will be automatically reduced to iMax text (mostly used for sending text messages)
3. Print class 3.1 Print control 4. Event class 4.1 Shield right click 4.2 Block all function keys 4.3 --> and 4.4 Block key combination ctrl N 5. Web design class 5.1 Continuously scrolling text and pictures (note It is continuous, and there is no blank space between the two paragraphs of text and pictures) 5.2 HTML editing control class 5.3 Color selection box control 5.4 Drop-down menu 5.5 Two-layer or multi-level drop-down menu 5.6 IE menu-like buttons. (The effect is like the navigation column of rongshuxa.com) 5.7 Dynamic effects of status bar and title bar (there are many examples, you can study them) 5.8 After double-clicking, the web page automatically scrolls 6. Tree structure. 6.1 asp SQL version 6.2 asp xml sql version 6.3 java sql or java sql xml 7. Production of borderless effect 8. Linked drop-down box technology 9. Text sorting
1. Verification type 1. Numeric verification 1.1 Integer /^(-| )?d $/.test(str) 1.2 An integer greater than 0 (used for verification of the passed ID) /^d $/.test(str) 1.3 Verification of negative integers /^-d $/.test(str) 2. Time class 2.1 Short time, in the form of (13:04:06) function isTime(str) { var a = str.match(/^(d{1 ,2})(:)?(d{1,2})2(d{1,2})$/); if (a == null) {alert('The input parameter is not in time format' ); return false;} if (a[1]>24 || a[3]>60 || a[4]>60) { alert("The time format is incorrect"); return false } return true; 🎜> { 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 time, shaped like (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}):(d{1,2})$/; var r = str.match(reg); if(r ==null)return false; var d= new 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. In the form of (2003-05, or 2003-5) 2.5 Only hours and minutes, in the form of (12:03) 3. Form class 3.1 All form values cannot be empty
3.2 The value of the multi-line text box cannot be empty. 3.3 The value of the multi-line text box cannot exceed sMaxStrleng 3.4 The value of the multi-line text box cannot be less than sMixStrleng 3.5 Determine whether the radio button is selected. 3.6 Determine whether the check box is selected. 3.7 Select all check boxes, multiple selections, unselect all, inverse selection 3.8 Determine the file type during file uploading 4. Character type 4.1 The judgment characters are all composed of letters from a-Z or A-Z
4.2 The judgment characters are composed of letters and numbers. 4.3 Judging the characters consisting of letters and numbers, scratching lines, point numbers. And the beginning can only be the lower line and letter /^([a-za-z _] {1}) ( [w]*)$/g.test(str) 4.4 String replacement function.Replace(); 5. Browser class 5.1 Determine the browser type window.navigator. appName 5.2 Determine the version of IE Window.navigator.appVersion 5.3 Determine the resolution of the client Window.screen.height; window.screen.width;
6. Combination Class 6.1 Judgment of email. function ismail(mail) { return(new RegExp(/^w ((-w )|(.w ))*@[A-Za-z0-9] ((.|- )[A-Za-z0-9] )*.[A-Za-z0-9] $/).test(mail)); } 6.2 Verification of mobile phone number 6.3 ID card Verification of function isIdCardNo(num) { if (isNaN(num)) {alert("The input is not a number!"); return false;} var len = num.length, re; if (len == 15) re = new RegExp(/^(d{6})()?(d{2})(d{2})(d{2})( d{3})$/); else if (len == 18) re = new RegExp(/^(d{6})()?(d{4})(d{2} ; match(re); " /" a[4] "/" a[5]); var B = D.getYear()==a[3]&&(D.getMonth() 1)==a[4]&&D.getDate ()==a[5];
var B = D.getFullYear()==a[3]&&(D.getMonth() 1)==a[4]&&D.getDate()==a[5]; } if (!B) {alert("The date of birth in the entered ID number " a[0] " is incorrect! "); return false;} return true; 🎜> Select all
<script> <BR>function checkAll(str) <BR>{ <BR> var a = document.getElementsByName(str); <BR> var n = a.length; <BR> for (var i=0; i<n; i++) <BR> a[i].checked = window.event.srcElement.checked; <BR>} <BR>function checkItem(str) <BR>{ <BR> var e = window.event.srcElement; <BR> var all = eval("document.hrong."+ str); <BR> if (e.checked) <BR> { <BR> var a = document.getElementsByName(e.name); <BR> all.checked = true; <BR> for (var i=0; i<a.length; i++) <BR> { <BR> if (!a[i].checked){ all.checked = false; break;} <BR> } <BR> } <BR> else all.checked = false; <BR>} <BR></script>
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn