fax.asp
来自「模块及功能: 1.汽车新闻 分类.查询.翻页 2.出售信息 搜索.评」· ASP 代码 · 共 57 行
ASP
57 行
<%
Function CheckString(String1)
Dim TempStr, Length, Result, I, Char, Ascii
TempStr = TRIM(String1)
Length = Len(TempStr)
Result = False
For I = 1 To Length
Char = Mid(TempStr,I,1)
Ascii = Asc(Char)
If (Ascii > 47 and ascii< 58) or ascii=45 Then
Result = True
Else
Result = False
Exit For
End If
Next
CheckString = Result
End Function
fax=trim(request("fax"))
if fax <> "" then
%>
<%
if len(fax) <5 or len(fax) >15 then
%>
<b><font color="#FF0000">×</b>对不起!传真号码长度在5-15个字符! </font>
<%
response.end
end if
%>
<%
if InStr(fax,",") >= 1 OR InStr(fax,"%") >=1 OR InStr(fax,"<") >=1 OR InStr(fax,">") >=1 OR InStr(fax,"=") >=1 OR InStr(fax,"'") >=1 then%>
<b><font color="#FF0000">×</b>对不起!传真号码中不能有<、>、,和'等非法字符! </font>
<%
response.end
end if
%>
<%
a= CheckString(fax)
if a = false then
%>
<b><font color="#FF0000">×</b>对不起!传真号码的格式不正确,请重新填写! </font>
<%
response.end
end if
%>
<b><font color="#008000">√</font></b>
<%else%>
<b><font color="#008000">√</font></b>您的传真号码,可以不填!
<%end if%>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?