登录后查才能浏览下载更多咨询,有问题联系QQ:3283999
您需要 登录 才可以下载或查看,没有账号?入住遨海湾
×
1.检查是否有效邮件地址 Function CheckEmail(strEmail) Dim re Set re = New RegExp re.Pattern = "^[w-.]{1,}@([da-zA-Z-]{1,}.){1,}[da-zA-Z-]{2,3}$" re.IgnoreCase = True CheckEmail = re.Test(strEmail) End Function 2.测试变量是否为空值,空值的含义包括:变量不存在/为空,对象为Nothing,0,空数组,字符串为空 Function IsBlank(ByRef Var) IsBlank = False Select Case True Case IsObject(Var) If Var Is Nothing Then IsBlank = True Case IsEmpty(Var), IsNull(Var) IsBlank = True Case IsArray(Var) If UBound(Var) = 0 Then IsBlank = True Case IsNumeric(Var) If (Var = 0) Then IsBlank = True Case Else If Trim(Var) = "" Then IsBlank = True End Select End Function 3.得到浏览器目前的URL Function GetCurURL() If Request.ServerVariables("HTTPS") = "on" Then GetCurrentURL = "https://" Else GetCurrentURL = "http://" End If GetCurURL = GetCurURL & Request.ServerVariables("SERVER_NAME") If (Request.ServerVariables("SERVER_PORT") <> 80) Then GetCurURL = GetCurURL & ":" & Request.ServerVariables("SERVER_PORT") GetCurURL = GetCurURL & Request.ServerVariables("URL") If (Request.QueryString <> "") Then GetCurURL = GetCurURL & "?" & Request.QueryString End Function |