Old style, no more nonsense to say, directly to everyone paste Java code.
The code is as follows:
Package Com.zzw.getPhoneInfos;
Import android.app.Activity;
Import Android.content.Context;
Import Android.os.Build;
Import Android.os.Bundle;
Import Android.telephony.TelephonyManager;
Import Android.util.Log; public class Mainactivity extends activity {@Override protected void onCreate (Bundle savedinstancestate) {super.
OnCreate (savedinstancestate);
Setcontentview (R.layout.activit
/********************Function Name: Istelephonefunction function: fixed, mobile phone number check function, return True, reverse, return falsefunction parameters: obj, number to be checkedCheck rule:(1) Number, "(", ")" and "-"(2) The p
PHP API to get mobile phone number attribution, API mobile phone number
The API interface since the 2011 SAE platform on-line stable operation to date, increased the support of section 17th, welcomed the various collection note l
HTML code:Total number: The interface is as follows:JS Code:Calculate number of input mobile phone number, verify multi-number, filter duplicate number
PHP Implementation mobile phone number middle four-bit with asterisk (*) hidden custom function share, mobile number asterisk
PHP shielded phone number middle four bits:
Copy the Code
Use js to verify whether the input is a mobile phone number or phone number. The following is a good example. If you are interested, refer to the following code:
The Code is as follows:
Enter 13875998850Output valid Contact method
Input 0136986+9557There is a problem with the output contact mode?function Funcphone ($STR)//Phone number regular expression test{Return (Preg_match (/^ (d{3)) | ( d{3}-))? ((0d{2,3}) |0d{2,3}-)? [1-9]d{6,8}$/, $str)] true:false;}function Funcmtel ($STR)//mobile number Regu
} []? ([-]? (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 =
function Checknum () {var Mobilereg =/^ (13[0-9]|14[0-9]|15[0-9]|17[0-9]|18[0-9]) \d{8}$/i;var phonereg =/^0\d{2,3}-?\d{7,8}$/;var num = $ (' #txtTel '). Val ();if (!mobilereg.test (num) !phonereg.test (num)) {Alert ("The phone number is incorrect, please re-enter!") ");} }It is best to match the onblur () label, and be careful to test the number with the. Test (
Verify that the account is validVerification rules: a combination of letters, numbers, and underscores. It must start with a letter and contain 4-16 characters.
FunctionCheckuser (STR ){VaRRe=/^ [A-Za-Z] \ W {3, 15} $/;If(Re. Test (STR) {alert ("Correct");}Else{Alert ("Error") ;}} Checkuser ("jiade_cnblogs");//Call
Verify mobile phone numberVerification rules: 11-digit
We do the site, the user experience that is very important, such as 12306 Rob tickets need to fill in the ID card, if not the space, dense to give me a very depressing feeling, and also not easy to check whether the information is filled out correctly, so I wrote a use JS implementation of the completion of the social security number, mobile phone
Js randomly generates name, mobile phone number, ID card number, bank card number [Implementation Code], js bank card
During development and testing, you often need to enter the name, mobile p
The following is a small Editor of the js generator code written by myself. The code is relatively simple and highly practical. If you are interested, let's study it together, you often need to enter the name, mobile phone number, ID card number, and bank card number, which
[Code Note] verifies the mobile phone number, email address, license plate number, and license plate number.
I. Code.
-(Void) viewDidLoad {[super viewDidLoad]; // Do any additional setup after loading the view. NSLog (@ "------ % d ------", [self isValidateEmail: @ "12345"])
./** 28. * Get phone number 29. */30. Public String Getnativephonenumber () {31. String Nativephonenumber=null; Nativephonenumber=telephonymanager.getline1number (); . return nativephonenumber; 34.} 35. 36./** 37. * Get mobile Service Information 38. */39. Public String Getprovidersname () {40. String Providersname = "n/a";
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.