点滴积累,融会贯通

-----喜欢一切有兴趣的东西

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::
父窗体打开页面的javascript
function GoToPage(id)
        {
       
           
var title="title";
           
var url="xxxxx.aspx?ID="+id+"&Radom="+Math.random();;
           
var Width="700";
           
var Height="600";
           
var arguemnts = new Object();
           arguemnts.window = window;
            if (document.all&&window.print)
            {
                window.showModalDialog(url,arguemnts,
"dialogWidth:" + Width + "px;dialogHeight:" + Height + "px;center:yes;status:no;scroll:yes;help:no;");
        
            }
            
else 
           { 
                window.open(url,
"","width=" + Width + "px,height=" + Height + "px,resizable=1,scrollbars=1"); 
           }
        }
子页面执行代码后:
Response.Write("<script language='javascript'>window.dialogArguments.window.location = window.dialogArguments.window.location;</script>");
            Response.Write(
"<script>self.close();</script>");
如果是window.open打开的:
Response.Write("<script language='javascript'>window.opener.location.热reload();</script>") ; 
Response.Write(
"<script language='javascript'>window.opener=null;window.close();</script>");
posted on 2007-09-27 10:44  小寒  阅读(11389)  评论(1编辑  收藏  举报