mobile.asp
来自「模块及功能: 1.汽车新闻 分类.查询.翻页 2.出售信息 搜索.评」· ASP 代码 · 共 65 行
ASP
65 行
<%
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 + =
减小字号Ctrl + -
显示快捷键?