Response.Write("<script>")
Response.Write("window.open ('xxx.aspx?参数1=vv&参数2=nn','_parent');")
Response.Write("</script>")xxx.aspx里面要得到传回的值就Request["参数1"],Request["参数2"]...就可以了
Response.Write("window.open ('xxx.aspx?参数1=vv&参数2=nn','_parent');")
Response.Write("</script>")xxx.aspx里面要得到传回的值就Request["参数1"],Request["参数2"]...就可以了
如果只是传到下一个页面的话也可以把参数放在url中传递
我要从从页面(B页面)传递参数回主页面(A页面),不是从主页面(A页面)传递参数到从页面(B页面)
我是基于WEB方式的
var style ="dialogHeight:200px;dialogWidth:500px;status:no;scroll:no" ;
var ret = showModalDialog("uploadrpt.htm","上传报表",style) ;
ret参数是用来接受B页面(这里是:uploadrtp.htm)传过来的参数
B页面可以加这些代码:
<script language="JavaScript"> function Validate(){
Str1=window.form1.textfield.value
window.returnValue = Str1;
//alert("work");
window.close();
}
其中window.returnValue就是返回值。
Response.Write("<script>")
Response.Write("window.open ('A.aspx?参数1=vv&参数2=nn','_parent');")
Response.Write("</script>")
A页面如下:
A叶面打开B页面用window.open('b.aspx','_blank
','height=,left=')
A.aspx里面要得到传回的值就Request["参数1"],Request["参数2"]...就可以了
Response.Write("<script language=javascritp>window.close();</script>");