Home > Net >  Front desk form validation JS method for.net version 3.5 after the upgrade to version 4.5
Front desk form validation JS method for.net version 3.5 after the upgrade to version 4.5

Time:04-22

Before a project framework is the.net 3.5, modified and adjusted for. NET after version 4.5, a front form validation JS method existing in debugging pop-up message is the following problems:

Error: unable to get undefined or null reference attribute "value",

 
The function checkmail () {
Var txtmail=document. GetElementById (" txtmail ");
Var txtmailTips=document. GetElementById (" txtmailTips ");

If (txtmail value! {
="")Var isreg=txtmail. Value. The match (/^ \ w/- \ w. + * @ ([A Za - z0-9] [9] - A - Za - z0 - + \.) + [A Za - z] {2, 14} $/);
If (isreg==null) {
TxtmailTips. The innerText='please enter the correct email address;
return false;
}
The else {
TxtmailTips. The innerText=' ';
return true;
}
}
The else {
TxtmailTips. The innerText=' ';
return true;
}
}
</script>




Should be how to modify?
  • Related