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.

  • 相关阅读:
    tuple 元组及字典dict
    day 49 css属性补充浮动 属性定位 抽屉作业
    day48 选择器(基本、层级 、属性) css属性
    day47 列表 表单 css初识
    day 46 http和html
    day 45索引
    day 44 练习题讲解 多表查询
    day 40 多表查询 子查询
    day39 表之间的关联关系、 补充 表操作总结 where 、group by、
    day38 数据类型 约束条件
  • 原文地址:https://www.cnblogs.com/sniper007/p/2587991.html
Copyright © 2011-2022 走看看