asp如何取变量的值

来源:百度知道 编辑:UC知道 时间:2024/05/14 07:41:08
如果一个文本框中有三个变量,用asp怎样取出变量的值?如(x,y,z)
如何用asp取出x,y,z三个变量的值?请赐教,谢谢!!!
原程序:
<option value="<%=rs("name")%>(<%=rs("username")%>)"><%=keepformat(rs("name"))%></option>

取值程序:
dim mysendto
mysendto=split(sendto,"|",-1,1)
for each sendtoinf in mysendto
userdeptpoint=InStr(sendtoinf,":")
if userdeptpoint>0 then
sendtoinflen=len(sendtoinf)
recipientusername=right(sendtoinf,sendtoinflen-userdeptpoint)
usernamepoint=Instr(recipientusername,"(")
usernamelen=len(recipientusername)
recipientusername=left(recipientusername,usernamelen-1)
recipientusername=right(recipientusername,usernamelen-1-usernamepoint)
现在我想增加一个变量,既
<option value="<%=rs("name")%>(<%=rs("username")%>;<%=rs("qqq")%>)"><%=keepformat(rs("name"))%></option&g

str="(x,y,z)"
str=replace(str,"(","")
str=replace(str,")","")
a=split(str,",")
a(0)=x
a(1)=y
a(2)=z

只要你的数据库中有qqq这个栏位,它就会自动取出来的。。

如果能到到"(x,y,z)"
可以利用数组
str="(x,y,z)"
str=replace(replace(str,"(",""),")","")
strarr=split(str,",")

'得到三个变量
str1=strarr(0)
str2=strarr(1)
str3=strarr(2)

<html>
<body>

<%
dim name
name="POP"
response.write("这里是 " & name)
%>

</body>
</html>