首页 > 学院 > 开发设计 > 正文

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

2019-11-18 22:01:46
字体:
来源:转载
供稿:网友
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


发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表