今天一个同事在琢磨:
function dialogReturn(value1){
window.parent.returnValue = value1;
window.parent.close();
}
这样一个函数的时候,有点模糊,后来查看MSDN终于找到答案。
window Object Represents an open window in the browser. (表现在浏览器中打开一个窗口。)
Typically, the browser creates one window object when it opens an HTML document. However, if a document defines one or more frames (that is, contains one or more frame or iframe tags), the browser creates one window object for the original document and one additional window object for each frame. These additional objects are child windows of the original window and can be affected by actions that occur in the original. For example, closing the original window causes all child windows to close. You can also create new windows (and corresponding window objects) using methods such as open, showModalDialog, and showModelessDialog.
如果一个文档定义了一个或多个框架,浏览器为每一个框架创建一个window对象为这个源document和一个附加的window对象。 这些附加的对象是源文档的子windows,并且受源动作的影响。例如,关闭这个源窗体导致子窗体也被关闭。
returnValue |
Sets or retrieves the value returned from the modal dialog window. |