Do WebForm notes leap year date

Source: Internet
Author: User

1. Show Details

If the male and female display problem cannot display true false time converted into Chinese national display Chinese characters cannot display code directly
2. Duplicate User name Verification

Query validation from the database
4. Date Judgment

Judging the year is a problem.

 varYear = document.getElementById ("Dr_year"); varMon = document.getElementById ("Dr_month"); varDay = document.getElementById ("Dr_day"); document.getElementById ("Dr_year"). onchange =function () {                if(Mon.value = = "2")        {            if( This. value% 4 = = 0) {Day.options.length= 0;  for(vari = 1; I < 30; i++)                {                    varOP = document.createelement ("option")); Op.value=i; Op.innerhtml=i;                Day.appendchild (OP); }            }            Else{day.options.length= 0;  for(vari = 1; I < 29; i++) {                    varOP = document.createelement ("option")); Op.value=i; Op.innerhtml=i;                Day.appendchild (OP); } }}} document.getElementById ("Dr_month"). onchange =function () {                if( This. Value = = "2") {            if(year.value% 4 = = 0) {Day.options.length= 0;  for(vari = 1; I < 30; i++) {                    varOP = document.createelement ("option")); Op.value=i; Op.innerhtml=i;                Day.appendchild (OP); }            }            Else{day.options.length= 0;  for(vari = 1; I < 29; i++) {                    varOP = document.createelement ("option")); Op.value=i; Op.innerhtml=i;                Day.appendchild (OP); }            }        }        Else if( This. Value = = "1" | | This. Value = = "3" | | This. Value = = "5" | | This. Value = = "7" | | This. Value = = "8" | | This. Value = = "10" | | This. Value = = "12") {Day.options.length= 0;  for(vari = 1; I < 32; i++) {                varOP = document.createelement ("option")); Op.value=i; Op.innerhtml=i;            Day.appendchild (OP); }        } Else{day.options.length= 0;  for(vari = 1; I < 31; i++) {                varOP = document.createelement ("option")); Op.value=i; Op.innerhtml=i;            Day.appendchild (OP); }        }    }


5, the modification page cannot submit


6, when editing, if the password is not filled, then retain the original password

Generally is a single change in the password unified change in the method of adding a judgment

Execute statement do not change password if password is blank

Password not empty in modify

Use JS to determine if the password is consistent

varP1 = document.getElementById ("TextBox2"); varP2 = document.getElementById ("TextBox3"); P1.onkeyup=function() {Pwdisok (P1, p2);} P2.onkeyup=function() {Pwdisok (P1, p2);} functionPwdisok (PWD1, pwd2) {if(Pwd1.value! =pwd2.value) {document.getElementById ("Pwd_error"). InnerText = "two times password inconsistent!" "; document.getElementById ("Pwd_error"). Style.color = "Red"; Pwdok=false; }        Else{document.getElementById ("Pwd_error"). InnerText = "Correct!" "; document.getElementById ("Pwd_error"). Style.color = "Green"; Pwdok=true; }    }

Do WebForm notes leap year date

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.