Verification of mobile phone numbers (starting from 13 and 158, 159, a total of 11 digits)
Copy code code as follows:
var Re;
var ss = document.GetelementByid ('Textbox3'). Value;
Re = /^(13 [0-9] {9}) | (15 [89] [0-9] {8}) $ /
if (Re.Test (SS))
{{
document.GetelementByid ('label3'). Incertext = "" "; // Assign value to label
}
else
{{
document.GetelementByid ('label3'). Incertext = "Please enter the right mobile phone number!";;;;
document.GetelementByid ('ImageButton1'). Disabled = TRUE; // Disable button with disabled
}
Verification of the email address (including@.)
Copy code code as follows:
var Re;
var ss = document.GetelementByid (textboxid). Value;
Re = //w@/w*/./w/
if (Re.Test (SS))
document.GetelementByid ('label4'). Incertext = "" ";
else
{{
document.GetelementByid ('label4'). Incertext = "Please enter the correct email address!";;;
document.GetelementByid ('ImageButton1'). Disabled = TRUE;
}
Authentication of postal code (the beginning cannot be 0, a total of 6 digits)
Copy code code as follows:
var ss = document.GetelementByid ('textbox4'). Value;
var Re = /^[1-9] [0-9] {5} $ /
if (Re.Test (SS))
document.GetelementByid ('label5'). Incertext = "" ";
else
{{
document.GetelementByid ('label5'). Incertext = "The postal code format is incorrect!";;;;
}
VAR R = /^13 [012345789] {9} / 11 digits starting with 13, the latter 9 can not appear 6