functionuser.asp

来自「全站生成htm静态页面」· ASP 代码 · 共 75 行

ASP
75
字号
<%
function Checkin(s) 
s=trim(s) 
s=replace(s," ","&amp;nbsp;") 
s=replace(s,"'","&amp;#39;") 
s=replace(s,"""","&amp;quot;") 
s=replace(s,"&lt;","&amp;lt;") 
s=replace(s,"&gt;","&amp;gt;") 
Checkin=s 
end function 
function IsValidEmail(email)
IsValidEmail = true
names = Split(email, "@")
if UBound(names) <> 1 then
   IsValidEmail = false
   exit function
end if
for each name in names
   if Len(name) <= 0 then
     IsValidEmail = false
     exit function
   end if
   for i = 1 to Len(name)
     c = Lcase(Mid(name, i, 1))
     if InStr("abcdefghijklmnopqrstuvwxyz_-.", c) <= 0 and not IsNumeric(c) then
       IsValidEmail = false
       exit function
     end if
   next
   if Left(name, 1) = "." or Right(name, 1) = "." then
      IsValidEmail = false
      exit function
   end if
next
if InStr(names(1), ".") <= 0 then
   IsValidEmail = false
   exit function
end if
i = Len(names(1)) - InStrRev(names(1), ".")
if i <> 2 and i <> 3 then
   IsValidEmail = false
   exit function
end if
if InStr(email, "..") > 0 then
   IsValidEmail = false
end if
end function
sub error()
%>
<html><head>
<title>HTML版-错误提示</title>
<LINK href="../js/css1.css" type=text/css rel=stylesheet>
</head>
<body topmargin="0" leftmargin="0">

        <div align="left">
          <table border="0" cellpadding="15" cellspacing="0" width="100%"  bordercolor="#000000" style="border-collapse: collapse" height="94">
            <tr>
              <td width="100%" bgcolor="#FFFFFF" height="80" align="center" nowrap>
                <font color=#FF9900>
                <p>提醒您:</p>
                </font>
                <font color=red>
                <b>&nbsp; <%=errmsg%>&nbsp; </b>
                <p><b><a href="javascript:top.window.close();">[关闭]</a></b>
              </td>
            </tr>
          </table>
        
</div>
</body>                    
</html> 
<%
end sub
%>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?