牛顿第四定律只有一次:asp中,vbscript过程中的变量如何传递到另外一个页面?

来源:百度文库 编辑:查人人中国名人网 时间:2024/05/01 22:53:51
<script language="vbscript">
sub change()
dim i1
dim p1
dim i2
dim p2
dim str1
//取出select的索引值
i1=frm1.select1.selectedindex
//取出select的value值
p1=document.all.select1.options(i1).value
//取出select的索引值
i2=frm1.select2.selectedindex
//取出select的value值
p2=document.all.select2.options(i2).value

if i1=0 then
if i2=0 then
str1="FNumber="
else
str1="FNumber like"
end if
else
if i2=0 then
str1="FClassName="
else
str1="FClassName like"
end if
end if

end sub
</script>
这是选择select时所要取出的值,这是一个页面,我想在另外一个页面里面能够调用str1的值,这个问题很急,哪个大侠能够帮我看看?
可以使用QueryString在不同的页面之间传送信息。

<a href="另外一个页面.asp?p1=<%=p1%>">连接</a>

另外一个页面
<%
p1=request.QueryString("p1")//接受数据
%>
---------------------
还是不行,如果要把str1赋给一个表单元素应该怎样做?

呵呵,你把str1这个值赋给一个表单元素不就行了??

可以使用QueryString在不同的页面之间传送信息。

<a href="另外一个页面.asp?p1=<%=p1%>">连接</a>

另外一个页面
<%
p1=request.QueryString("p1")//接受数据
%>