您的位置:首页 > 编程语言 > C#

C# 关闭弹出页面问题

2008-10-20 09:39 239 查看
说清楚点

height=100 width=400 "menubar=no "mywin"
<script language=javascript>function outPut(){ var text = document.abc.text.value; var win = window.open("" 取代父窗口表单以前的值 这是关键 //把子窗口中表单的值回传给父窗口 对父窗口操作使用opener对象 使用self对象 resizeable=yes"); win.document.writeln("<title>输出结果</title>"); win.document.writeln("你的信息是:<p>"); win.document.writeln(text); win.document.writeln("<input type=text name=child value=子窗口信息>"); //对子窗口本身操作 然后关闭子窗口 win.document.writeln("<input type=button value=关闭自己 onClick='window.opener.abc.text.value=self.child.value;self.close()'>"); //可以控制关闭父窗口 win.document.writeln("<input type=button value=关闭父窗口 onClick='window.opener.opener=null;window.opener.close()'>"); //刷新父窗口 win.document.writeln("<input type=button value=刷新父窗口 onClick='window.opener.location.reload()'>"); win.document.close(); win.focus();}</script><form name=abc method=post><input type=text name=text size=50><input type=button value=提交 onClick="outPut()"></form>

|||
你是要原页面刷新还是不刷新啊
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐