繁体中文
设为首页
加入收藏
当前位置:ASP技术首页 >> ASP技巧 >> StripNonNumeric函数源程序

StripNonNumeric函数源程序

2004-10-01 08:26:10  作者:  来源:互联网  浏览次数:9  文字大小:【】【】【
简介:<% Function StripNonNumeric(strInput) Dim iPos, sNew, iTemp strInput = Trim(strInput) If strInput <> "" Then iPos = 1 iTemp = Len(strInput) While iTemp >= iPos If IsNumeric(M...

<%

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

%>

责任编辑:admin
相关文章