·您现在的位置: 云翼网络 >> 文章中心 >> 网站建设 >> 网站建设开发 >> ASP网站建设 >> StripNonNumeric函数源程序

StripNonNumeric函数源程序

作者:佚名      ASP网站建设编辑:admin      更新时间:2022-07-23
<%
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
%>