简单的检查输入email是否合法程序

2000-11-12 10:35:42  作者
function chkEmail(email)
on error resume next
dim i,l,pos1,pos2
chkEmail=true
if isnull(email) then chkEmail=false:exit function
pos1= instr(email,%26quot;@%26quot;)
pos2=instrRev(email,%26quot;.%26quot;)
if not(pos1%26gt;0) or not (pos2%26gt;0) or pos1%26gt;pos2 then
chkEmail=false
end if
if err.number%26lt;%26gt;0 then err.clear
end function