returnValue--------------------------------------------------------------------------------DescriptionSpecifies the return value from the modal dialog window. This property applies only to windows created using the showModalDialog method. Syntax object.returnValue[ = Variant] Applies Towindow
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
HTML http://vip.5d.cn/friday/upload/dhtml html&css.chm Microsoft Windows脚本技术 http://vip.5d.cn/friday/upload/SCRIPT56.chm 也可以到 http://msdn.microsoft.com
看一下 http://www.csdn.net/develop/read_article.asp?id=15113 就明白了
object.returnValue[ = Variant]
Applies Towindow
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
http://vip.5d.cn/friday/upload/dhtml html&css.chm Microsoft Windows脚本技术
http://vip.5d.cn/friday/upload/SCRIPT56.chm 也可以到
http://msdn.microsoft.com
怎么忘了showModalDialog……
index.html
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script>
function fortable1()
{
var yyy;
yyy="this is a text.";
var arr =window.showModalDialog("table.html", yyy, "dialogWidth:16.5em; dialogHeight:9.5em;resizable:0; help:0; scroll:0; status:0");
if (arr != null){
var ss;
ss=arr.split("*")
// row=ss[0];
// col=ss[1];alert(ss[0]);
alert(ss[1]);
alert(ss[2]);
}
}
</script>
</head><body>
<input type="button" name="S" value="it" onClick="fortable1();">
</body>
</html>table.html<HTML>
<HEAD>
<TITLE>通用企业商务系统</TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<STYLE TYPE="text/css">
td {font-size: 10.8pt}
body {font-size: 10.8pt}
BUTTON {width:5em}
</STYLE>
<SCRIPT LANGUAGE=JavaScript FOR=Ok EVENT=onclick>
window.returnValue = selrow.value+"*"+selcol.value+"*"+"abc";
window.close();
</SCRIPT>
<script>
function kkb(){
var bba=window.dialogArguments;
alert(bba);
}
</script>
</HEAD><BODY bgcolor=menu onload="kkb();">
<fieldset><legend>
<font size="2"><em>输入表格</em></font></legend>
<div align="center" style="width: 188; height: 105"><center>
<table border="0" cellspacing="10" cellpadding="0">
<tr><td align=center>
行数: </td><td align=center>列数:</td></tr><tr><td><INPUT TYPE=TEXT SIZE=7 ID=selrow></td><td><input type=text id=selcol size=7></tr>
<tr><td colspan=2 align=center><BUTTON ID=Ok TYPE=SUBMIT>确定</BUTTON> <BUTTON ONCLICK="window.close();">取消</BUTTON></td></tr></table></center></div>
</fieldset>
</BODY>
</HTML>