最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
asp 电子邮箱email验证实例程序
时间:2022-07-02 22:32:25 编辑:袖梨 来源:一聚教程网
function IsValidEmail(email)
dim names, name, i, c
'Check for valid syntax in an email address.
IsValidEmail = true
names = Split(email, "@")
if UBound(names) <> 1 then
IsValidEmail = false
exit function
end if
for each name in names
if Len(name) <= 0 then
IsValidEmail = false
exit function
end if
for i = 1 to Len(name)
c = Lcase(Mid(name, i, 1))
if InStr("abcdefghijklmnopqrstuvwxyz_-.", c) <= 0 and not IsNumeric(c) then
IsValidEmail = false
exit function
end if
next
if Left(name, 1) = "." or Right(name, 1) = "." then
IsValidEmail = false
exit function
end if
next
if InStr(names(1), ".") <= 0 then
IsValidEmail = false
exit function
end if
i = Len(names(1)) - InStrRev(names(1), ".")
if i <> 2 and i <> 3 then
IsValidEmail = false
exit function
end if
if InStr(email, "..") > 0 then
IsValidEmail = false
end if
end function
相关文章
- 伊瑟海因里希技能加点及搭配推荐 10-18
- 永远的蔚蓝星球遗迹夺宝第6关攻略 10-18
- 新三国志曹操传野猪毁田二关卡攻略 10-18
- 龙族卡塞尔之门影镰恺撒技能介绍 10-18
- 龙魂旅人阿瑞斯阵容搭配推荐 10-18
- 伊瑟弥瑟亚技能加点及搭配推荐 10-18