首页/技术开发/内容

StripNonNumeric函数源程序

技术开发2022-08-05 阅读()
<%
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
%>




……

相关阅读