日期:2014-05-17  浏览次数:20713 次

asp 怎样从父窗体给弹出的子窗体传一个值?---高分求教
我想在父   窗体上的显示等级的图片上面做个连接,当用户点这个图片的时候就弹出一个窗体,用户能通过弹出的窗体更改父窗体中对应信息的等级,我是新手,请高手指教,谢谢

------解决方案--------------------
新窗口:

<script>
window.opener.document.getElementById( "信息的等级的ID ").innerText = "你想修改的等级 ";
</script>
------解决方案--------------------
1.window.parent

当前窗口的上一级窗口,当前窗口可以是在iframe 中或是frameset 的一个frame中

2.window.top 当前窗口的最顶级窗口。

不管当前窗口是嵌了多少层或是通过iframe 或是frame嵌套,window.top 将返回最外层窗口。

说明:如果当前窗口不在iframe 或frame 中,window.top 或window.parent 将返回本窗口对象。

3.window.opener

通过window.opener方式打开当前窗口的窗口。

4.window.窗口名称

访问当前窗口的子窗口通过window的name 来访问。


详细的你可以到这去看下。代码多了不贴了。

http://blog.163.com/dlink_cn@126/blog/static/18578180200721642456888/
------解决方案--------------------
<a href= "javascript:void(0); " onclick= "window.open( 'UpdateLevel.asp?id= <%=ID%> ', 'newWin ', 'status=yes, toolbar=yes,scollbars=yes ') "> Level </a>


UpdateLevel.asp 通过获得的ID修改完等级后,

<script>
opener.location.reload();
window.close();
</script>