我想实现A页面打开B页面,B页面进行数据选择后关闭,不刷新A页面的情况下把选择数据传给A页面中的INPUT,谢谢。 我想实现A页面打开B页面,B页面进行数据选择后关闭,不刷新A页面的情况下把选择数据传给A页面中的INPUT,谢谢。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 在B页面中window.opener.document.XXXX.innerText = XXX 如 terryshi(terryshi)所说在B页进行数据选择时 window.opener.document.input1.innerText = 你传的值 , 就可以把 你选的值传给他的父窗体中的 INPUT。 //父窗口function test() { var vDialog=null; vDialog=showModalDialog("../basedata/test.htm",window,"status:no;resizable:yes;dialogHeight:210px;dialogWidth:360px;unadorne:yes"); if (vDialog != null) { //window.alert(vDialog) ; vDialog.idDialogInput.value=idOpenerInput.value; } }//子窗口(../basedata/test.htm)<input type="text" id="idDialogInput" NAME="idDialogInput"><br> <br> <input type="button" onclick="document.idOpenerInput.value=idDialogInput.value" value="传递文字" ID="Button1" NAME="Button1"> //还是提示对象window.opener.document.idOpenerInput为空 是下面这段,上面的写少了//父窗口function test() { var vDialog=null; vDialog=showModalDialog("../basedata/test.htm",window,"status:no;resizable:yes;dialogHeight:210px;dialogWidth:360px;unadorne:yes"); if (vDialog != null) { //window.alert(vDialog) ; vDialog.idDialogInput.value=idOpenerInput.value; } }//子窗口(../basedata/test.htm)<input type="text" id="idDialogInput" NAME="idDialogInput"><br> <br> <input type="button" onclick="window.opener.document.idOpenerInput.value=idDialogInput.value" value="传递文字" ID="Button1" NAME="Button1"> //还是提示对象window.opener.document.idOpenerInput为空 建议搂主看看Javascript中页面之间的关系 window.opener.document.你的父窗体的NAME.你要给值的控件的NAME.value = 值 VS2010 在 运行时修改代码 的快捷键是什么 C# 操作word横纵混排 如何能够准确获得进程信息 怎么监控.net崩掉及处理方法? 截取控制台dos错误信息 请教外挂的的实现原理 C# WebService 问题(在线急等) 小菜鸟请教各位大仙~~ 关于C# sealed类是否可以存在虚函数 源码在此,高分请教高手!!! 求救:代码的使用方法。 我想用C#写一个数据压缩的程序,请问我应该怎么去做?
window.opener.document.XXXX.innerText = XXX
function test()
{
var vDialog=null;
vDialog=showModalDialog("../basedata/test.htm",window,"status:no;resizable:yes;dialogHeight:210px;dialogWidth:360px;unadorne:yes");
if (vDialog != null)
{
//window.alert(vDialog) ;
vDialog.idDialogInput.value=idOpenerInput.value;
} }
//子窗口(../basedata/test.htm)
<input type="text" id="idDialogInput" NAME="idDialogInput"><br>
<br>
<input type="button" onclick="document.idOpenerInput.value=idDialogInput.value" value="传递文字"
ID="Button1" NAME="Button1">
//还是提示对象window.opener.document.idOpenerInput为空
//父窗口
function test()
{
var vDialog=null;
vDialog=showModalDialog("../basedata/test.htm",window,"status:no;resizable:yes;dialogHeight:210px;dialogWidth:360px;unadorne:yes");
if (vDialog != null)
{
//window.alert(vDialog) ;
vDialog.idDialogInput.value=idOpenerInput.value;
} }
//子窗口(../basedata/test.htm)
<input type="text" id="idDialogInput" NAME="idDialogInput"><br>
<br>
<input type="button" onclick="window.opener.document.idOpenerInput.value=idDialogInput.value" value="传递文字"
ID="Button1" NAME="Button1">
//还是提示对象window.opener.document.idOpenerInput为空