WEB开发网
开发学院WEB开发ASP 简单的检查输入email是否合法程序 阅读

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

 2000-11-12 10:13:14 来源:WEB开发网   
核心提示:function chkEmail(email)on error resume nextdim i,l,pos1,pos2chkEmail=trueif isnull(email) then chkEmail=false:exit function pos1= instr(email,"@")pos
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,"@")
   pos2=instrRev(email,".")
   if not(pos1>0) or not (pos2>0) or pos1>pos2 then       
     chkEmail=false
   end if
   if err.number<>0 then err.clear
 end function

Tags:简单 检查 输入

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接