Native JavaScript phone number verification, email verification, id verification. When used, pass in the string to be validated, return ture to represent conformance, return false code does not conform.
Use:
document.getElementById ("Btnphone"). Onclick=function () {
alert (Validationhandler.isphone ( document.getElementById ("Phoneinput"). Value) ==true? " Legal ":" Illegal ")
};
document.getElementById ("Btnemail"). Onclick=function () {
alert (Validationhandler.isemail ( document.getElementById ("Emailinput"). Value) ==true? " Legal ":" Illegal ")
};
document.getElementById ("Btnidcard"). Onclick=function () {
alert (Validationhandler.isidcard ( document.getElementById ("Idcardinput"). Value) ==true? " Legal ":" Illegal ")
};
The above introduction is this article for JavaScript Common Data Validation plug-in encyclopedia full of content, I hope to help.