Rss & SiteMap

Foxtable(狐表) http://www.foxtable.com

新一代数据库软件,完美融合Access、Foxpro、Excel、vb.net之优势,人人都能掌握的快速软件开发工具!
共2 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

标题:验证数字或字符的位数

1楼
yeyun 发表于:2011/5/8 17:25:00
请问,怎样通过事件验证输入的内容的位数,例如手机号码:必须是11位,不可多,也不可少!
2楼
狐狸爸爸 发表于:2011/5/8 17:36:00

Dim s as string = "13800138000"

IF s.Length <> 11 Orelse IsNumeric(s) = False Then

    messagebox.show("无效手机号码!")

End If

 

共2 条记录, 每页显示 10 条, 页签: [1]

Copyright © 2000 - 2018 foxtable.com Tel: 4000-810-820 粤ICP备11091905号

Powered By Dvbbs Version 8.3.0
Processed in .01563 s, 2 queries.