開新視窗 for JavaScript
方法一
vReturnValue = window.showModalDialog(sURL [, vArguments] [, sFeatures])
IE和FIREFOX皆可
EX:
window.showModalDialog("openwin.html","Arguments","dialogHeight: 200px; dialogWidth: 200px; dialogTop: 10px; dialogLeft: 10px; edge: Raised; center: Yes; help: Yes; resizable: Yes; status: Yes;");
方法二
oNewWindow = window.open( [sURL] [, sName] [, sFeatures] [, bReplace])
IE可
EX:
window.open('openwin.html','newWin',
'modal=yes,width=200,height=200,resizable=no,scrollbars=no');
子視窗叫母視窗函數
方法一
window.dialogArguments.Function(value);
方法二
window.opener.Function(value);