JS-determine the mobile phone number and zip codeBytes ----------------------------------------------------------------------------------------------------------------------Phone/Mobile: Zip code:
Author: nycqwert
JS Common mobile phone number ZIP code number regular verification
*/
Phone number Verificationfunction Istelephone (str){RegExp =/^[0-9]+ (-[0-9]+) {1,2}$/;return Regexp.test (str);}
ZIP Code Verificationfunction Ispostcode (str){RegExp =/^[0-9]{6,6}$/;return Regexp.test (str);}
Mobile Verification
functio
) { If (Long. tryparse (ID, out n) = false | n
{} If (address. indexof (ID. remove (2) =-1)
{} datetime time = new datetime ();
If (datetime. tryparse (birth, out time) = false)
{}}
# Whether region is int type /** // // whether it is int type //
// //
Public static bool isint (string source) { If (RegEx. match (source ). success) {{}}}
# region: Check whether the length of a string contains two Chinese characters in a limit. /** /// // check the strin
Php obtains all information (such as address, zip code, country, and latitude and longitude) of a specified IP address.
This example describes how to obtain all the information (such as address, zip code, country, and latitude and longitude) of a specified IP Address by using php. Share it with you for your reference.
This article describes how to obtain all the information (such as the address, zip code, country, and latitude and longitude) of a specified IP address in php, it is very simple and practical to use an API call to query visitor information. For more information, see the example in this article) all IP information (address, zip
I carefully studied the efficiency of the decompression program written in php, which is much higher than I thought. Since it is so good, I just need to optimize it and use it in my background, although the control panel in most of the space currently has the compression and decompression function, it is sometimes troublesome.Before doing this, I have never touched on php compression. I have searched some websites on the Internet. Most of them are php compression classes and compression function
In order to help you remember the Shenzhen zip code, it is recorded here. As long as it is in Shenzhen with 518000, if you want to receive a letter more quickly, please enter the zip code accurately, the following are the regions in Shenzhen:
Luohu DistrictEast Lake 518021, Tian bei 518020Taibai 518019 Lian Tang 5180
} []? ([-]? (D) {1, 12}) + $ /;Var patrn =/^ [+] {0, 1} (d) {1, 3} []? ([-]? (D) | []) {1, 12}) + $ /;If (! Patrn.exe c (s) return falseReturn true} // Verify the mobile phone number. It must start with a number and can contain "-" in addition to a number.Copy codeThe Code is as follows:Function isMobil (s){Var patrn =/^ [+] {0, 1} (d) {1, 3} []? ([-]? (D) | []) {1, 12}) + $ /;If (! Patrn.exe c (s) return falseReturn true} // Verify the
Http://www.cnblogs.com/wuhuisheng/archive/2011/03/23/1992652.html
The main code for phone number verification is as follows:
Public bool istelephone (string str_telephone)
{
Return System. Text. regularexpressions. RegEx. ismatch (str_telephone, @ "^ (\ D {3, 4 }-)? \ D {6, 8} $ ");
}
The main code used to verify the mobile phone number is as follows:
Public bool ishandset (string str_handset)
{
Return Sys
Mobile phone number verification (13 opening and 158,159 beginning, total 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 '). innertext= ""; Assign value to label with InnerText
}
Else
{
document.getElementById (' Label3 '). inner
Convert the ZIP code from Singapore to the corresponding region
// Example
Dco_get_district ("160149 ");
/*##################################
CONVERT POSTAL CODE TO DISTRICT NUMBER AND NAME
##################################*/
Function dco_get_district ($ postal ){
The function is judged whether it is a valid postal code (fixed length), the method is simple to use regular to operate.
The code is as follows
Copy Code
Function name: checkpost ($C _post)Function: Determine whether it is a valid postcode (fixed length)Parameter: $C _post (zip
There are always a lot of text boxes that prohibit non-Numeric Character Input. For example, if the mobile phone number has a zip code, the following describes how to prohibit it. Interested friends can learn about it at work, there are always a lot of text boxes that prohibit non-numeric characters from being entered, such as mobile phone numbers.
The Code i
At work, you always encounter a lot of text boxes that prohibit the input of non-numeric characters, such as mobile phone number and zip code.
Copy Code code as follows:
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.