最新下载
热门教程
- 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
相关文章
- 《真三国无双:起源》反击方法 11-25
- 《真三国无双:起源》武艺使用方法 11-25
- 《潜行者2:切尔诺贝利之心》手动存档方法介绍 11-25
- 《潜行者2:切尔诺贝利之心》支线任务盗亦无道攻略 11-25
- 《真三国无双:起源》回避作用分享 11-25
- 《潜行者2:切尔诺贝利之心》战役存档槽作用介绍 11-25