http://blog.csdn.net/skynice/archive/2010/12/23/6094120.aspx

解决方案 »

  1.   

    页面结构如下:index.html,里有两个框架页面view plaincopy to clipboardprint?
    ·········10········20········30········40········50········60········70········80········90········100·······110·······120·······130·······140·······150
    <body style="width:100%;height: 100%;border:0;margin:0px; padding:0;overflow: hidden;" scroll="no">  
        <div id="divTop" style="width: 100%;height:110px">  
            <iframe id="iframeTop" name="iframeTop" src="TopPage.aspx" mce_src="TopPage.aspx" width="100%" height="110px" scrolling="no" marginheight="0" marginwidth="0" frameborder="0">  
            </iframe>  
        </div>  
            <iframe id="gis" name="gis" src="gis/default.aspx" mce_src="about:blank" width="100%"  scrolling="no" marginheight="0" marginwidth="0" frameborder="0">  
            </iframe>  
    </body>  在gis窗口中,使用 window.open弹出了一个页面RainDistributing.aspx有以下代码view plaincopy to clipboardprint?
    window.onload = function() {  
               var date, start, end;  
               date = Date;  
               var edate = opener.$get('edate');  
               start = date.parseLocale(opener.$get('sdate').value, "yyyy-MM-dd HH:00");  
               end = date.parseLocale(edate.value, "yyyy-MM-dd HH:mm:ss");  
               //'< % =String.Format("{0:yyyy年MM月dd日  HH时}--{1:yyyy年MM月dd日 HH时mm分}",start,end) %>';  
               $get('SubTitle').innerHTML = start.format('yyyy年MM月dd日  HH时 --- ') + end.format("yyyy年MM月dd日 HH时mm分")  
               var table = document.getElementById('GridView1');  
               if (table) {  
                   new Table(table);  
               }  
           }   在var edate = opener.$get('edate');行会报错: Unable to evaluate the expression. 被呼叫方拒绝接收呼叫。根据调试可以看到opener是一个对象,但不能访问这个window对象里的任何元素。