StripNonNumeric函数源程序
2000-12-23 10:57:01 来源:WEB开发网核心提示:<%Function StripNonNumeric(strInput)Dim iPos, sNew, iTempstrInput = Trim(strInput)If strInput <> "" TheniPos = 1iTemp = Len(strInput)While iT
<%
Function StripNonNumeric(strInput)
Dim iPos, sNew, iTemp
strInput = Trim(strInput)
If strInput <> "" Then
iPos = 1
iTemp = Len(strInput)
While iTemp >= iPos
If IsNumeric(Mid(strInput,iPos,1)) = True Then
sNew = sNew & Mid(strInput,iPos,1)
End If
iPos = iPos + 1
Wend
Else
sNew = ""
End If
StripNonNumeric = sNew
End Function
%>
Function StripNonNumeric(strInput)
Dim iPos, sNew, iTemp
strInput = Trim(strInput)
If strInput <> "" Then
iPos = 1
iTemp = Len(strInput)
While iTemp >= iPos
If IsNumeric(Mid(strInput,iPos,1)) = True Then
sNew = sNew & Mid(strInput,iPos,1)
End If
iPos = iPos + 1
Wend
Else
sNew = ""
End If
StripNonNumeric = sNew
End Function
%>
Tags:StripNonNumeric 函数 源程序
编辑录入:爽爽 [复制链接] [打 印]更多精彩
赞助商链接