刚在写asp呵呵碰到检测数字的了 以前用了javascript现在用起来不会了 太久没玩asp了
(*^__^*) 嘻嘻……刚好大鸟哥给我丢了一段Function来IsInt返回Boolean 是数字就是True啦
ASP/Visual Basic代码
- Function IsInt(Str)
- Dim Re
- Set Re = New RegExp
- Re.Global = True
- Re.IgnoreCase = False
- Re.MultiLine = False
- Re.Pattern = "^[1-9]{1}[0-9]*$"
- IsInt=Re.Test(Str)
- Set Re=Nothing
- End Function
