最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
asp检测email 的合法性程序
时间:2022-06-30 09:14:34 编辑:袖梨 来源:一聚教程网
function IsValidEmail(email)
dim names, name, i, c
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
相关文章
- ps精修品牌电冰箱图片教程 07-10
- ff14水晶世界怎么转职-最终幻想14转职任务在哪接 07-10
- 微信应用号与H5三个故事两个猜想 07-10
- XRP ETF势头强劲,推动XRP进入链上新高地 07-10
- 最终幻想14手游什么职业厉害-最终幻想14手游职业推荐 07-10
- 币安交易中心app最新版安卓 - 欧联交易所app下载最新版 07-10