• 弹出自定义窗口


    1.window对象的open方法

     window的open方法用于创建一个新窗口,语法如下

    window.open(URL,windowname[,windowFeatures][,replaceFlag])

    URL: 弹出窗口的URL地址

    windowname:弹出窗口的名称,可为空

    windowFeature:字符串值,是由逗号分隔的属性赋值表达式,下表为window.open方法的属性

    属性                          类型                                            说明

    height                     整型                                        窗口高度

    width                        整型                                        窗口宽度

    top                            整型                                        窗口距离屏幕上方的像素值    

    left                            整型                                        窗口距离屏幕左侧的像素值

    toolbar                      Boolean                                    是否显示工具栏,1或yes为显示,0或no为不显示

    menubar                    Boolean                                    是否显示菜单栏,1或yes为显示,0或no为不显示

    scrollbars                   Boolean                                    是否显示滚动栏,1或yes为显示,0或no为不显示

    resizable                    Boolean                                    是否允许改变窗口大小,1或yes为允许,0或no为不允许

    location                     Boolean                                    是否显示地址栏,1或yes为显示,0或no为不显示

    status                        Boolean                                    是否显示状态栏,1或yes为显示,0或no为不显示

    fullscreen                   Boolean                                    是否全屏显示,1或yes为全屏显示,0或no表示不全屏显示

    2.弹出自定义窗口

    (1)弹出指定大小和位置的窗口

    <script language="Javascript"

    <!--

        window.open("new.htm","new","height=100,width=100,top=10,left=20")

    -->

    </Script>

    (2)弹出不显示工具栏,菜单栏和滚动栏的窗口

    <script language="Javascript"

    <!--

        window.open("new.htm","new","toolbar=no,menubar=no,location=no,scrollbar=no,status=no")

    -->

    </Script>

    (3)弹出全屏窗口

    <script language="Javascript"

    <!--

        window.open("new.htm","new","fullscreen=yes")

    -->

    </Script>

  • 相关阅读:
    算法训练 区间k大数查询
    算法训练 最大最小公倍数
    身份证号码升级
    python包与模块导入
    python函数
    HDU 3595 博弈论,被支配的恐惧
    BZOJ 3195 [Jxoi2012]奇怪的道路
    大暑假集训
    [Poi2010]Monotonicity 2
    BZOJ 4868 HEOI 期末考试
  • 原文地址:https://www.cnblogs.com/djcsch2001/p/2035759.html
Copyright © 2020-2023  润新知