·您现在的位置: 云翼网络 >> 文章中心 >> 网站建设 >> 网站建设开发 >> ASP网站建设 >> 简单的检查输入email是否合法程序

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

作者:佚名      ASP网站建设编辑:admin      更新时间:2022-07-23
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