zoukankan      html  css  js  c++  java
  • 【javascript】JS的window.createPopup()

    JS的window.createPopup()学习

    function OpenShortcutMenu( domObj )
    {
    var pop = window.createPopup();
    var popBody = pop.document.body;
    popBody.innerHTML = "Testing..."
    pop.show(window.event.x, 76, 140,200, document.body);
    }


    (1)var pop 变量:

    popup 对象

    一种特殊的顶层窗口,主要用于出现在应用程序主窗口之外的对话框、消息框和其它临时窗口。

    注释:此对象在 Microsoft® Internet Explorer 5.5 的脚本中可用。


    (2)window.createPopup() 方法:

    createPopup Method

    Creates a popup window.

    Syntax

    oPopup = window.createPopup( [vArgs])

    Parameters

    vArgs
    Optional. This argument is reserved for future use.

    Return Value

    Returns the popup window object.

    Remarks

    The pop-up window is initially in a hidden state.

    When an element has focus and causes a popup to appear, the element does not lose focus. Because of this, an onblur event associated with an element that creates a popup will not occur when the popup is displayed.


    (3)popup的document属性

    document Property

    Retrieves the HTML document in a given popup window.

    Syntax

    [ oDocument = ] popup.document

    Possible Values

    oDocument
    Object that receives the document object of the pop-up window.

    The property is read-only. The property has no default value.


    ()pop.show(...)方法:

    show Method

    Displays the pop-up window on the screen.

    Syntax

    popup.show(iX, iY, iWidth, iHeight [, oElement])

    Parameters

    iX
    Required. Integer that specifies the x-coordinate of the pop-up window, in pixels.

    iY
    Required. Integer that specifies the y-coordinate of the pop-up window, in pixels.

    iWidth
    Required. Integer that specifies the width of the pop-up window, in pixels.

    iHeight
    Required. Integer that specifies the height of the pop-up window, in pixels.

    oElement
    Optional. Object that specifies the element to which the x,y coordinates are relative. If none is given, the x,y coordinates are relative to the desktop, where (0,0) is the upper left corner.

    Return Value

    No return value.

  • 相关阅读:
    Qt编写安防视频监控系统1-通道切换
    Qt编写数据可视化大屏界面电子看板12-数据库采集
    Serv-U
    CLAAS KGaA mbH
    法国雷诺
    Bulma
    react技术栈
    小程序开发
    上海hande
    30个极大提高开发效率的VSCode插件
  • 原文地址:https://www.cnblogs.com/sniper007/p/2587991.html
Copyright © 2011-2022 走看看