国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > ASP > 正文

判斷EMAIL是否正確的程序

2024-05-04 11:06:00
字體:
供稿:網(wǎng)友

以下是代碼片段:
<%
’判斷EMAIL是否正確
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
%>
取自星云下載系統(tǒng)2.0.0 SP2 可用度很好,可直接使用,無須修改

發(fā)表評(píng)論 共有條評(píng)論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 屯门区| 定南县| 手游| 金湖县| 三原县| 永年县| 武义县| 陆川县| 菏泽市| 阆中市| 阿拉善左旗| 元朗区| 佛山市| 滕州市| 新昌县| 霍林郭勒市| 西城区| 灵璧县| 武邑县| 桐城市| 汉阴县| 武宣县| 南开区| 南通市| 彭州市| 额敏县| 泰宁县| 黄骅市| 云和县| 永定县| 体育| 肃宁县| 乃东县| 新建县| 山丹县| 天长市| 梧州市| 咸阳市| 新河县| 视频| 康乐县|