asp数组使用(2)
程序员文章站
2023-10-27 14:22:16
复制代码 代码如下:<% function newtxt(sz,strtxt,cityid) dim ali,icount...
复制代码 代码如下:
<%
function newtxt(sz,strtxt,cityid)
dim ali,icount,i
dim ali2
ali=split(sz,",")
ali2=split(strtxt,",")
icount=ubound(ali)
cityid = request.querystring("cityid")
if request.querystring("cityid") ="" then
cityid="234"
end if
for i=0 to icount
if cityid= ali(i) then
newtxt=ali2(i)
end if
next
end function
%>
<%
dim cityid,cityname,id
cityid= "234,54,294,2347,653,121"
cityname = "海口,二,三,四,五,六"
id = request.querystring("cityid")
if request.querystring("cityid") ="" then
id=234
end if
%>
<%
=newtxt(cityid,cityname,id)
%>
function newtxt(sz,strtxt,cityid)
dim ali,icount,i
dim ali2
ali=split(sz,",")
ali2=split(strtxt,",")
icount=ubound(ali)
cityid = request.querystring("cityid")
if request.querystring("cityid") ="" then
cityid="234"
end if
for i=0 to icount
if cityid= ali(i) then
newtxt=ali2(i)
end if
next
end function
%>
<%
dim cityid,cityname,id
cityid= "234,54,294,2347,653,121"
cityname = "海口,二,三,四,五,六"
id = request.querystring("cityid")
if request.querystring("cityid") ="" then
id=234
end if
%>
<%
=newtxt(cityid,cityname,id)
%>
上一篇: 桔子的医用效能