asp 用split出现null无效的问题

来源:互联网 发布:琅琊榜台湾知乎 编辑:程序博客网 时间:2024/06/05 21:09

在用split分割值的时候,如果值为null,则会提示split无效,应先进行一下判断再取split:

 

<%
if str<>"" and isnull(str)=false then
  tags=split(str,",")
  For i = 0 To UBound(tags)
  str=str&"xxx"
  next
end if
%>

原创粉丝点击