jQuery手机号码验证插件:mobilePhoneNumber

jopen 5年前

mobilePhoneNumber 是用于验证和格式化移动电话号码的通用JS库。

$('input.phone-num').mobilePhoneNumber();

You can bind to an event when the user changes the country of the phone number:

$('input.phone-num').bind('country.mobilePhoneNumber', function(e, country) {    console.log('The new country code:', country);  })

You can find a demo here.

Dependencies:

jQuery手机号码验证插件:mobilePhoneNumber

项目主页:http://www.open-open.com/lib/view/home/1441788538945