📄 fax.asp
字号:
<%
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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -