当前位置:首页 > 网络编程 > WEB编程 > ASP > StripNonNumeric函数源程序

StripNonNumeric函数源程序

点击次数:26 次 发布日期:2008-11-26 17:30:16 作者:源代码网
源代码网推荐 <%
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
%>

源代码网供稿.
网友评论 (0)
会员中心
网络编程
本站推荐
网络编程之精华