📄 mobile.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 Then
Result = True
Else
Result = False
Exit For
End If
Next
CheckString = Result
End Function
mobile=trim(request("mobile"))
if mobile <> "" then
%>
<%
if left(mobile,2) <> "13" then
%>
<b><font color="#FF0000">×</b>请输入正确的手机号码! </font>
<%
response.end
end if
%>
<%
if len(mobile) <> 11 then
%>
<b><font color="#FF0000">×</b>手机号码长度在11个字符! </font>
<%
response.end
end if
%>
<%
if InStr(mobile,",") >= 1 OR InStr(mobile,"%") >=1 OR InStr(mobile,"<") >=1 OR InStr(mobile,">") >=1 OR InStr(mobile,"=") >=1 OR InStr(mobile,"'") >=1 then%>
<b><font color="#FF0000">×</b>手机号码中不能有%、'、=、<和>等非法字符! </font>
<%
response.end
end if
%>
<%
a= CheckString(mobile)
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 + -