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.

参考URL:

http://blog.joycode.com/dotey/archive/2005/01/19/4...

http://www.blueidea.com/tech/web/2005/2423.asp

http://blog.donews.com/dowei/archive/2005/08/24/52...

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值