学院首页>网络编程>ASP>StripNonNumeric函数源程序

StripNonNumeric函数源程序

作者: 来源:不详 添加时间:2006-5-25 19:03:19
  <%
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
%>


 
站内搜索