ASP怎么做A+B+C=D

来源:百度知道 编辑:UC知道 时间:2024/06/17 04:32:22
a b c
abc先分割后在自动相加。。有没有办法啊。。
给全部代码。。谢谢。

temp="12345"
pos=len(temp)
t=""
r=0
for i=1 to pos
t=t&mid(temp,i,1)&","
next
t=left(t,len(t)-1)
tSplit=split(t,",")

for i=0 to Ubound(tSplit)
r=r+tSplit(i)
next
response.Write r

ABC之间至少要有分割符号
然后用函数进行分割
然后
A=XXX
B=XXX
C=XXX

D=A+B+C

Response.Write(D)

思路就是这样

有办法,这样写
<%
dim d
d="a b c"
e=split(d," ")
for i=lbound(e) to ubound(e)
f=f+e(i)
next
Response.Write f
%>

什么意思?说清楚点。