asp数组使用(2)
发布时间:2016-12-29 来源:查字典编辑
摘要:复制代码代码如下:
复制代码 代码如下:<%
FunctionNewtxt(sz,strtxt,cityid)
Dimali,icount,i
Dimali2
ali=split(sz,",")
ali2=split(strtxt,",")
icount=UBound(ali)
cityid=Request.QueryString("cityid")
ifRequest.QueryString("cityid")=""then
cityid="234"
endif
Fori=0Toicount
Ifcityid=ali(i)Then
Newtxt=ali2(i)
EndIf
Next
EndFunction
%>
<%
dimcityid,cityname,id
cityid="234,54,294,2347,653,121"
cityname="海口,二,三,四,五,六"
id=Request.QueryString("cityid")
ifRequest.QueryString("cityid")=""then
id=234
endif
%>
<%
=Newtxt(cityid,cityname,id)
%>