End Function
'****************************************************
'函数名:CheckEmail
'作 用:邮箱格式检测
'参 数:str ----Email地址
'返回值:true无误,false有误
'****************************************************
Public function CheckEmail(email)
CheckEmail=true
Dim Rep
Set Rep = new RegExp
rep.pattern="([.a-zA-Z0-9_-]){2,10}@([a-zA-Z0-9_-]){2,10}(.([a-zA-Z0-9]){2,}){1,4}$"
pass=rep.Test(email)
Set Rep=Nothing
If not pass Then CheckEmail=false
End function
'--------------信息提示----------------------------
'****************************************************
'函数名:Alert
'作 用:弹出对话框提示
'参 数:msg ----对话框信息
' gourl ----提示后转向哪里
'返回值:无
'****************************************************
Public Function Alert(msg,goUrl)
msg = replace(msg,"'","'")
If goUrl="" Then
goUrl="history.go(-1);"
Else
goUrl="window.location.href='"&goUrl&"'"
End IF
Response.Write ("<script language=""JavaScript"" type=""text/javascript"">"&vbNewLine&"alert('" & msg & "');"&goUrl&vbNewLine&"</script>")
Response.End
End Function
'****************************************************
'函数名:GoBack
'作 用:错误信息提示









