f zID:cpp2017
11263次访问,排名9758(1)好友21人,关注者230
好的工具是成功的一半
cpp2017的文章
原创 12 篇
翻译 0 篇
转载 0 篇
评论 24 篇
cpp2017(慕白兄)的公告
由于很多网友经常提到一些问题,所以在此将这些问题整理一下.这里并没有什么很深的技术,只是一些常见且基础的问题,尽量以最简单易懂和浅显的实例,让新学者受到些启发,希望能对他们有帮助,如有不对之处,请不吝批评指正。
最近评论
jeffcn2:有一个问题,这样在服务器上不是产生了很多Excel文件,还有就是要控制输出的工作表的样式要如何控制(如:我想从A2开始输出,并设置标题为粗体居中?),请达人指点
ucemouse:我在调用File.Copy(,,true)是,提示:文件正在被另一进程使用,其实就是它自己的进程在使用,两个文件是放在同一个目录中的.请求帮助
lex1982:很有创意,我喜欢
xp1056:这个是不是要求.net版本2005以上?我在03里面用的,没体现出效果来。
比如:SetFocusOnError="True"提示验证控件的该属性找不到
xudongyh:http://blog.csdn.net/xudongyh/archive/2008/04/04/2248700.aspx
文章分类
收藏
    相册
    文件
    存档
    软件项目交易
    订阅我的博客
    XML聚合  FeedSky
    订阅到鲜果
    订阅到Google
    订阅到抓虾
    订阅到BlogLines
    订阅到Yahoo
    订阅到GouGou
    订阅到飞鸽
    订阅到Rojo
    订阅到newsgator
    订阅到netvibes

    原创 窗口间的关系及交互(一)收藏

    新一篇: 窗口间的关系及交互(二)  | 旧一篇: GridView或DataGrid 固定表头,滚动数据的例子.

    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 来访问。

     

    举个简单的例子现在有a.htm,b.htm,c.htm,d.htm四个文件。

    a.htm

     

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head>
        
    <title>无标题页</title>
    </head>
    <body bgcolor="blue">
        AAAAAAAAAAAA
        
    <iframe src="b.htm" name="bChild"></iframe>
        
    </body>
    </html>
     

     

    b.htm

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head>
        
    <title></title>
    </head>
    <body bgcolor="green">
        BBBBBBBB

        
    <input type="button" value="click" onclick="javascript:Show();" />
    </body>
    </html>
     
    <script type="text/javascript">
        
    function Show()
        {
            alert(
    "B的parent窗口是:"+ window.parent.location.pathname);
            alert(
    "B的top窗口是:"+ window.top.location.pathname);
            
            
    var a = window.parent;
            
            alert(
    "a的parent窗口是:"+ a.parent.location.pathname);
            alert(
    "a的top窗口是:"+ a.top.location.pathname);
            
            
    var c = a.parent;
            
            alert(
    "c的parent窗口是:"+ c.parent.location.pathname);
            alert(
    "c的top窗口是:"+ c.top.location.pathname);
            
            
            
    var d = window.top;
            
            alert(
    "d.cChild窗口是"+ d.cChild.location.pathname);
            alert(
    "a.bChild窗口是"+ a.bChild.location.pathname);
            
            
        }
     
    </script>

     

     c.htm 

    <html>
        
    <body  bgcolor="red">
            CCCCCCCCCC
            
    <iframe src="a.htm"></iframe>
        
    </body>
    </html>
     

    d.htm

    <html>
        
    <frameset rows="50%,*">
            
    <frame src="c.htm" name="cChild" />
            
    <frame />
         
    </frameset>
    </html>

     

    通过浏览器访问d.htm就可以看出这几个窗口之间的关系。具体不在详述。

     

     

     

    发表于 @ 2007年02月27日 00:24:00|评论(loading...)|编辑

    新一篇: 窗口间的关系及交互(二)  | 旧一篇: GridView或DataGrid 固定表头,滚动数据的例子.

    评论:没有评论。

    发表评论  


    当前用户设置只有注册用户才能发表评论。如果你没有登录,请点击登录
    Csdn Blog version 3.1a
    Copyright © cpp2017(慕白兄)