怎么把弹出窗口的值传回来~ 在弹出的窗体中用window.opener可以引用父窗体 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 test.html<body><input type=text id=aa><input type=button onclick="window.opener.document.all('aaa').value=aa.value" value=upload></body>test6.html<input type=text name=aaa><a href onclick="window.open('test.html','','toolbar=0,location=0,status=0,menubar=0,width=500, height=350, scrollbars=1,resizable=0')">上传文件</a> <html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><meta name="GENERATOR" content="Microsoft FrontPage 4.0"><meta name="ProgId" content="FrontPage.Editor.Document"><title>子父窗口的操作</title></head><body><script>var win=null;function op(){win=window.open("about:blank","win","width=200,height=200");win.document.write("<input type='button' value='关闭父窗口' onclick='window.opener.opener=null;window.opener.close()'>");win.document.write("<input type='button' value='刷新你窗口' onclick='window.opener.location.reload()'>");}</script><input onclick="op()" value="打开窗口" type="button"><input type="button" value="最小化" onclick="if(win&&win.open&&!win.closed){win.resizeTo(0,0);win.moveTo(0,window.screen.width);}else alert('还没有打开窗口或已经关闭')"><input type="button" value="最大化" onclick="if(win&&win.open&&!win.closed){win.moveTo(-4,-4);win.resizeTo(screen.availWidth+8,screen.availHeight+8);}else alert('还没有打开窗口或已经关闭');"><input type=button value="关闭子窗口" onclick="if(win&&win.open&&!win.closed){win.opener=null;win.close()}else alert('还没有打开窗口或已关闭')"><input type=button value="刷新子窗口" onclick="if(win&&win.open&&!win.closed){win.location.reload();win.focus()}else alert('窗口还没有打开或已关闭')"><input type="button" value="看子窗口的大小" onclick="if(win&&win.open&&!win.closed){alert(win.document.body.clientWidth+'*'+win.document.body.clientHeight);win.focus();}else{alert('还没有打开窗口或者已关闭')};"></body></html>看看这个! 求正则 关于Extjs的理论问题 请问怎么分割这个数组 问个很麻烦的IE,FF,CSS兼容问题 为什么我取iframe的document.body.scrollTop一直都是0? javascript问题 有很多父元素,offsetTop能不能直接获取 对象 相对于window的位置? sql 2005 树形表非循环递归 转json 可编辑的<div contenteditable="true"> 回车替换浏览器默认操作问题 各位帮我看一下,如何打印对象 一个关闭窗口问题?请高手指点。为什么点关闭窗口按钮时,我选择取消还是会关闭窗口呢?请指教。 多级框架控制问题
<body>
<input type=text id=aa>
<input type=button onclick="window.opener.document.all('aaa').value=aa.value" value=upload>
</body>test6.html
<input type=text name=aaa>
<a href onclick="window.open('test.html','','toolbar=0,location=0,status=0,menubar=0,width=500, height=350, scrollbars=1,resizable=0')">上传文件</a>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>子父窗口的操作</title>
</head>
<body>
<script>
var win=null;
function op(){
win=window.open("about:blank","win","width=200,height=200");
win.document.write("<input type='button' value='关闭父窗口' onclick='window.opener.opener=null;window.opener.close()'>");
win.document.write("<input type='button' value='刷新你窗口' onclick='window.opener.location.reload()'>");
}
</script>
<input onclick="op()" value="打开窗口" type="button"><input type="button" value="最小化" onclick="if(win&&win.open&&!win.closed){win.resizeTo(0,0);win.moveTo(0,window.screen.width);}else alert('还没有打开窗口或已经关闭')"><input type="button" value="最大化" onclick="if(win&&win.open&&!win.closed){win.moveTo(-4,-4);win.resizeTo(screen.availWidth+8,screen.availHeight+8);}else alert('还没有打开窗口或已经关闭');"><input type=button value="关闭子窗口" onclick="if(win&&win.open&&!win.closed){win.opener=null;win.close()}else alert('还没有打开窗口或已关闭')"><input type=button value="刷新子窗口" onclick="if(win&&win.open&&!win.closed){win.location.reload();win.focus()}else alert('窗口还没有打开或已关闭')"><input type="button" value="看子窗口的大小" onclick="if(win&&win.open&&!win.closed){alert(win.document.body.clientWidth+'*'+win.document.body.clientHeight);win.focus();}else{alert('还没有打开窗口或者已关闭')};">
</body>
</html>看看这个!