触摸屏租赁
Touch screen rental
广告机租赁
Advertising rental
机器人租赁
Robot leasing
 当前位置:首页 > 全部 > asp从数据库读取两个字符串比较留下不同的

asp 从数据库读取两个字符串比较 留下不同的

有两个字符串,
比如
ss="1,2,3,4,5,11,17,109"
bb="1,4,11,17"
ww="2,3,5,109"
怎么获得 ww的值

满意回答

<%
function ssIs(sa,sb)
dim a(100)
if sa="" or sb="" then
 ssIs=""
 exit function
end if
 'on error resume next
 sat=split(sa,",")
 sas=split(sb,",")
  'if cstr(error.Number) then
   'ssIs="输入非法"
   'error.clear
   'on error goto 0
   'exit function
  'end if
for i=0 to ubound(sat)
 for j=0 to ubound(sas)
  if sat(i)=sas(j) then
  sat(i)="<!>"
  sas(j)="<!>"
  end if
 next
next

ssIs=join(sat,",")&join(sas,",")
ssIs=replace(ssIs,"<!>,","")
end function
ss="1,2,3,4,5,11,17,109"
bb="1,4,11,17"
response.write(ssIs(ss,bb))
ww=ssIs(ss,bb)
%>


工作室地址:重庆石桥铺电脑城B座 | 微信:z35544216 | 网址:www.35544216.com