zoukankan      html  css  js  c++  java
  • js缩小父窗口打开新窗口

    直接上代码,有图有真相,方便在左边窗口点击,右边显示预览页面

    <html>
    <head>
        <meta content="text/html; charset=utf-8" />
        <script type="text/javascript">
            var w5pwindow = null;
            function openLink() {
                var uri = "http://msdn.microsoft.com/en-us/library";
                top.moveTo(0, 0);
                top.resizeTo(450, screen.height);
                if (this.w5pwindow && !this.w5pwindow.closed)
                    this.w5pwindow.location.href = uri;
                else
                    this.w5pwindow = top.open(uri, "newindow", "status=1,toolbar=0,left=470,scrollbars=1,location=1,top=0,height=" + (screen.height - 110) + ",width=" + (screen.width - 470));
            };        
        </script>
    </head>
    <body>
        <div>
            <h1>This is the parent window</h1>
            <h3>You can click <input id="link" type="button" value="Here" onclick="openLink()"/> to open the child window</h3>
        </div>
    </body>
    </html>

    对新窗口:

    fullscreen=yes|no|1|0

    是否使用全屏模式显示浏览器。默认是 no。处于全屏模式的窗口必须同时处于剧院模式。

    height=pixels

    窗口文档显示区的高度。以像素计。

    left=pixels

    窗口的 x 坐标。以像素计。

    location=yes|no|1|0

    是否显示地址字段。默认是 yes。

    menubar=yes|no|1|0

    是否显示菜单栏。默认是 yes。

    resizable=yes|no|1|0

    窗口是否可调节尺寸。默认是 yes。

    scrollbars=yes|no|1|0

    是否显示滚动条。默认是 yes。

    status=yes|no|1|0

    是否添加状态栏。默认是 yes。

    titlebar=yes|no|1|0

    是否显示标题栏。默认是 yes。

    toolbar=yes|no|1|0

    是否显示浏览器的工具栏。默认是 yes。

    top=pixels

    窗口的 y 坐标。

    width=pixels

    窗口的文档显示区的宽度。以像素计。

  • 相关阅读:
    如何制作扫描版的文档
    网易云音乐歌单下载
    【超链接】一些OI学习网站
    爬虫 之Requests库的详细使用
    爬虫 之基本原理
    Django Rest framework 框架之认证使用和源码执行流程
    restful 规范(建议)
    基于Django实现restful api
    csrf补充
    Django Rest framework 框架
  • 原文地址:https://www.cnblogs.com/fengsiyi/p/3097212.html
Copyright © 2011-2022 走看看