webForm程序,实现参数传递功能,我这儿是用javascript实现:窗口 para:<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>无标题页</title>
<script language=javascript>
var vDialog=null;
function rdl_doDialog(){
vDialog=showModelessDialog("para2.aspx",window,"status:no;resizable:yes;dialogHeight:210px;dialogWidth:360px;unadorne:yes");
}
function rdl_setDialogValue(){
//if (vDialog != null) vDialog.idDialogInput.value=document.getElementById("idOpenerInput").value;if (vDialog != null)
{
vDialog.idDialogInput.value=document.getElementById("idOpenerInput").value;
} } </script>
</head>
<body>
<form id="form1" runat="server">
<div>
<input type=text id=idOpenerInput value="传递的文字"><br><br>
<input type=button onclick="rdl_doDialog();" value="建立对话框">
<input type=button onclick="rdl_setDialogValue();" value="传递文字">
</div>
</form>
</body>
</html>窗口para2<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>无标题页</title>
<script language=javascript>
function window.onunload() {
dialogArguments.vDialog=null;
}function fReturn()
{
window.dialogArguments.form1.idOpenerInput.value=document.getElementById("idDialogInput").value;
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<input type=text id=idDialogInput><br><br>
<input type=button onclick=" fReturn()" value="传递文字">
<input type=button onclick="window.close();" value="关闭"> </div>
</form>
</body>
</html>为什么无法把para里的值传递给para2中?para2是可以把值传递到para的
怎么回事,改怎么修改???
解决方案 »
- Socket流量控制
- 老问题,datagridview上对数据做修改
- 关于自己编写的DLL类库
- VS05制作ACTIVEX安装程序
- 求WINDOWS LIVE MAIL邮件账户添加删除功能的实现方法或者解决方法或者API接口
- 100分,求方案!!
- winform中怎么控制listview的行高和间距
- 水晶报表有什么函数能取得水晶报表的页数,注意是页数,不是页码(pagenumber),也就是该水晶报表一共包含多少页?
- C#和DirectX结合的问题
- 急!急!急!有关dataGrid........????
- c# web中如何创建含有yes和no的弹出对话框?
- 关于Dictionary 泛型类的问题
vDialog=showModelessDialog("para2.aspx?参数名称=" + stuff,window,"status:no;resizable:yes;dialogHeight:210px;dialogWidth:360px;unadorne:yes");
}
参数名称为在para2中接收的名称,stuff为传递的值