createPopup Method--------------------------------------------------------------------------------Creates a popup window.SyntaxoPopup = window.createPopup( [vArgs])
ParametersvArgs Optional. This argument is reserved for future use. Return ValueReturns the popup window object.ResThe 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. ExampleThe following example shows how to use the createPopup method to create and display a pop-up window.Show Example<HTML>
<HEAD>
<TITLE>Popup Example</TITLE><SCRIPT LANGUAGE="JScript">
var oPopup = window.createPopup();
function ButtonClick()
{
var oPopBody = oPopup.document.body;
oPopBody.style.backgroundColor = "lightyellow";
oPopBody.style.border = "solid black 1px";
oPopBody.innerHTML = "Click outside <B>popup</B> to close.";
oPopup.show(100, 100, 180, 25, document.body);
}
</SCRIPT>
</HEAD><BODY>
<BUTTON onclick="ButtonClick()">Click Me!</BUTTON>
</BODY>
</HTML>
ParametersvArgs Optional. This argument is reserved for future use. Return ValueReturns the popup window object.ResThe 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. ExampleThe following example shows how to use the createPopup method to create and display a pop-up window.Show Example<HTML>
<HEAD>
<TITLE>Popup Example</TITLE><SCRIPT LANGUAGE="JScript">
var oPopup = window.createPopup();
function ButtonClick()
{
var oPopBody = oPopup.document.body;
oPopBody.style.backgroundColor = "lightyellow";
oPopBody.style.border = "solid black 1px";
oPopBody.innerHTML = "Click outside <B>popup</B> to close.";
oPopup.show(100, 100, 180, 25, document.body);
}
</SCRIPT>
</HEAD><BODY>
<BUTTON onclick="ButtonClick()">Click Me!</BUTTON>
</BODY>
</HTML>
解决方案 »
- 求助:单击按钮复制定义好的内容到剪贴板
- 用js改变多选框传递的参数的问题
- 怎么解决引用外部文件超时的问题?
- javascript中有没有类似引用传递参数的方法呀,怎么用呢?请高手指点
- 表单验证的问题,我脑子都想破了。见鬼了???????
- <A href="" onclick="window.back();">back</A>错误
- 请问如何在打开一个word文档时给该doc的属性赋值?
- 请问:setExpression是怎么用的,有没有例子。
- 页面打印问题,不知道算不算难,在线等待。分我有的是,谁要是帮我解决的这个问题,我就在给他100分,不结贴就一直有效。
- (/(^\s*)|(\s*$)/g, "");这是什么
- 如何在页面中拖拽一个层,要最简单的代码?
- createPopup()我在M$下的dhtml&html&css帮助(chm)中找不到,相关的chm到那去down
ParametersiX 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 ValueNo return value.ExampleThe following example shows how to use the show method to create and display a pop-up window.Show Example<html>
<head>
<SCRIPT LANGUAGE="JScript">
var oPopup = window.createPopup();
function window_onload() {
var oPopupBody = oPopup.document.body;
oPopupBody.style.backgroundColor = "lightyellow";
oPopupBody.style.border = "solid black 1px";
oPopupBody.innerHTML = "Display some <B>HTML</B> here.";
oPopup.show(100, 100, 200, 50, document.body);}
</SCRIPT>
</head>
<body onload="window_onload();">
</body>
</html>