Contents Index Topic Contents
Previous Topic: showHelp
Next Topic: start
showModalDialog--------------------------------------------------------------------------------DescriptionCreates a dialog box and displays in it the HTML document given by URL. The dialog box is a special window that is modal, meaning it retains the input focus until the user closes it. Syntax
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 -------------------------------------------------------------------------------- Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.
解决方案 »
- 请问这个构造函数链为什么不成功啊
- extjs4 如何为treepanel动态添加节点
- 大家好,你们有谁知道怎样用js判断输入的内容既包含英文字母,又包含数字,又包含“-”吗?谢谢了
- 用window.close或parent.close关闭页面时,怎样不出现那个关闭提示对话框?
- 帮忙看看这个网页里的商品信息数据是如何发送到客户段的
- 怎样问题禁止状态栏显示文字?
- 框架顶页中的菜单项被底页覆盖通过什么方法可以显示出来?
- 如何比较A字符串中是否包含B字符串??(问题有点多,麻烦了~)
- JavaScript中如何将字符串与整数互相转换!先谢了,各位!(空)
- 求人体智能导诊相关插件推荐
- iframe内容动态修改问题
- 用mailto:?Body=...发邮件,body中怎么插入回车换行、html代码?
<HEAD>
<TITLE>Sample</TITLE>
<!-- SAMPLE_STYLE_START -->
<LINK REL="stylesheet" HREF="/workshop/basicSDKIE4.css" TYPE="text/css">
<!-- SAMPLE_STYLE_END --></HEAD><BODY TOPMARGIN=0 LEFTMARGIN=0 BGPROPERTIES="FIXED" LINK="#000000" VLINK="#808080" ALINK="#000000">
<BLOCKQUOTE CLASS="body"><SCRIPT>
function fnRandom(iModifier){
return parseInt(Math.random()*iModifier);
}
function fnSetValues(){
var iHeight=oForm.oHeight.options[
oForm.oHeight.selectedIndex].text;
if(iHeight.indexOf("Random")>-1){
iHeight=fnRandom(document.body.clientHeight);
}
var sFeatures="dialogHeight: " + iHeight + "px;";
return sFeatures;
}
function fnOpen(){
var sFeatures=fnSetValues();
window.showModalDialog("SMD_target.htm", "",
sFeatures)
}
</SCRIPT><FORM NAME=oForm>
Dialog Height <SELECT NAME="oHeight">
<OPTION>-- Random --
<OPTION>150
<OPTION>200
<OPTION>250
<OPTION>300
</SELECT>Create Modal Dialog Box
<INPUT TYPE="button" VALUE="Push To Create"
onclick="fnOpen()">
</FORM><!-- START_PAGE_FOOTER -->
<BR><BR><BR>
© <A CLASS="clsIncCpyRt" HREF="http://www.microsoft.com/isapi/gomscom.asp?TARGET=/misc/info/cpyright.htm" TARGET="_top">Microsoft Corporation. All rights reserved. Terms of use</A>.
<!-- END_PAGE_FOOTER -->
</BLOCKQUOTE></BODY>
</HTML>