gpt4 book ai didi

asp验证Ip格式的函数

转载 作者:qq735679552 更新时间:2022-09-29 22:32:09 31 4
gpt4 key购买 nike

CFSDN坚持开源创造价值,我们致力于搭建一个资源共享平台,让每一个IT人在这里找到属于你的精彩世界.

这篇CFSDN的博客文章asp验证Ip格式的函数由作者收集整理,如果你对这篇文章有兴趣,记得点赞哟.

  1. <%  
  2. '******************************  
  3. '函数:CheckIp(paR_strIp)  
  4. '参数:str 要检测的字符串  
  5. '作者:阿里西西  
  6. '日期:2007/7/13  
  7. '描述:验证Ip格式,是返回1,否则返回0  
  8. '示例:<%=CheckIp("219.45.23.11")%>  
  9. '******************************  
  10. Function CheckIp(paR_strIp)  
  11.    CheckIp =0  
  12.    Dim tmpLoop, tmpStr  
  13.    tmpStr =paR_strIp  
  14.    If tmpStr ="" Or IsNull(tmpStr) Then Exit Function  
  15.    tmpStr =Split(tmpStr, ".")  
  16.    If Not isArray(tmpStr) Then Exit Function  
  17.  
  18.    For tmpLoop =0 To ubound(tmpStr)  
  19.       If tmpStr(tmpLoop) ="" Or IsNull(tmpStr(tmpLoop)) Then Exit Function  
  20.       If Not isNumeric(tmpStr(tmpLoop)) Then Exit Function  
  21.       If Cint(tmpStr(tmpLoop)) >255 Or Cint(tmpStr(tmpLoop)) <1 Then Exit Function  
  22.    Next  
  23.    CheckIp =1  
  24. End Function  
  25. %> 

最后此篇关于asp验证Ip格式的函数的文章就讲到这里了,如果你想了解更多关于asp验证Ip格式的函数的内容请搜索CFSDN的文章或继续浏览相关文章,希望大家以后支持我的博客! 。

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com