A.htm
<a href="#" onclick="window.showModalDialog('B.htm',window,'')">测试<a>
B.htm
<script>
function Init()
{
if(window.dialogArguments)
{
var definewindow=window.dialogArguments;
window.confirm(definewindow.location.href);
}
}
</script>
<body onload="Init()">
<a href="#" onclick="window.showModalDialog('B.htm',window,'')">测试<a>
B.htm
<script>
function Init()
{
if(window.dialogArguments)
{
var definewindow=window.dialogArguments;
window.confirm(definewindow.location.href);
}
}
</script>
<body onload="Init()">
解决方案 »
- 一个类的设计问题
- 跟踪input值改变的兼容处理
- 用js控制两个select中option的移动
- ajax.xml的问题
- 取表单父级元素!
- Java中把对象设置为null没有必要,为什么在JavaScript中把对象设置为null是个好习惯呢?
- 正则表达式如何使用参数???急
- 如何再一个表单的onsubmit的javascript中判断我的table中一共输入了几行
- 谁知道让窗体移动的javascript函数.能不能举个例子
- 有key,怎么解密ts,大佬看过来,点拨一下
- 请教各位 用什么代码能使在打看一页时光标自动停在用户名填写框内 谢谢
- 请问怎么在运行一个页的时候,没有提示就把这个页设为首页?
variant = object.showModalDialog(sURL [, vArguments [, sFeatures]])Parameter Description
sURL String specifying the URL of the document to load and display. While an empty string is accepted (""), it should be noted that this is useless since once a modal dialog has been opened, it cannot be accessed by the page that opened it.
vArguments Optional. Variant specifying the arguments to use when displaying the document. This parameter can be used to pass a value of any type including an array of values. The dialog can extract the values passed by the caller from the dialogArguments property of the window object.
sFeatures Optional. String specifying the window ornaments for the dialog box. It can be a combination of the following values. Syntax Description
dialogWidth:number Sets the width of the dialog window.
dialogHeight:number Sets the height of the dialog window.
dialogTop:number Sets the top position of the dialog window relative to the upper-left corner of the desktop.
dialogLeft:number Sets the left position of the dialog window relative to the upper-left corner of the desktop.
center:{yes | no | 1 | 0 } Specifies whether to center the dialog window within the desktop. Default is yes.
Return ValueReturns a number, string, or other value. This is equal to the value of the returnValue property as set by the document given by URL. ResThe default font settings should be set in the same way CSS attributes are set; for example, "font:3;font-size:4". To define multiple font values, use multiple font attributes. When dialogLeft and/or dialogTop is specified, the feature center is overridden, even though the default for center is yes.Applies Towindow