是否有HTML表单输入,只接受带有国家代码的电话号码,例如英国为+44,保加利亚为+359?
why dont you divide the field into 2 fields: country-code
(a dropdown with prefix like +44, +359 etc); and a regular number field with remaining of the phone number
.
使用这个jQuery插件非常适合这些情况: http : //www.jqueryscript.net/form/jQuery-International-Telephone-Input-With-Flags-Dial-Codes.html
我知道您可以使用javascript简单地完成它,但是如果您使用asp .net进行开发,则可以使用验证控件。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.