[英]Telephone input which requires country calling code
是否有HTML表单输入,只接受带有国家代码的电话号码,例如英国为+44,保加利亚为+359?
why dont you divide the field into 2 fields: country-code
(a dropdown with prefix like +44, +359 etc); 为什么不把这个字段划分为2个字段:
country-code
(前缀为+44,+ 359等的下拉列表); and a regular number field with remaining of the phone number
. 和剩余
phone number
的常规号码字段。
使用这个jQuery插件非常适合这些情况: http : //www.jqueryscript.net/form/jQuery-International-Telephone-Input-With-Flags-Dial-Codes.html
我知道您可以使用javascript简单地完成它,但是如果您使用asp .net进行开发,则可以使用验证控件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.