window Object의 open Method는 브라우저의 새 창을 열때 사용됩니다. 새창의 모양을 설정하는 부분이 항상 기억이 나지 않아 기록해둡니다.
아래 표는 http://www.w3schools.com 에서 복사했습니다.
Syntax
window.open(URL,name,specs,replace);
Parameter | Description | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
URL | Optional. Specifies the URL of the page to open. If no URL is specified, a new window with about:blank is opened | ||||||||||||||||||||||||||||
name | Optional. Specifies the target attribute or the name of the window. The following values are supported:
|
||||||||||||||||||||||||||||
specs | Optional. A comma-separated list of items. The following values are supported:
|
||||||||||||||||||||||||||||
replace | Optional.Specifies whether the URL creates a new entry or replaces the current entry in the history list. The following values are supported:
|
Example :
window.open(‘http://www.w3schools.com’,”, ‘width=400, height=400, resizable=0, scrollbars=0, status=0’);
window Object 의 showModalDialog Method는 HTML 문서를 Modal Dialog Box로 열때 사용합니다.
MSDN 문서를 참조
Syntax
vReturnValue = object.showModalDialog(sURL [, vArguments] [, sFeatures]);
Parameters
sURL | Required. String that specifies the URL of the document to load and display. |
---|---|
vArguments | Optional. Variant that specifies the arguments to use when displaying the document. Use this parameter to pass a value of any type, including an array of values. The dialog box can extract the values passed by the caller from the dialogArguments property of thewindow object. |
sFeatures | Optional. String that specifies the window ornaments for the dialog box, using one or more of the following semicolon-delimited values:
|
Example :
window.showModalDialog('example.htm','', 'dialogWidth=830px, dialogHeight=600px, resizalbe=0, scroll=0, status=0');
Modal Window에서 부모창(Opener) 제어 :
Modal Window에서 부모창(Opener)을 제어하기 위해서는
showModalDialog() 의 두번째 매개변수에 현재창을 전달해준다.
window.showModalDialog('example.htm',<strong>self</strong>, 'dialogWidth=830px, dialogHeight=600px, resizalbe=0, scroll=0, status=0'); Modal Window 에서 전달된 값을 사용할 수 있다. <strong>var opener = window.dialogArguments;</strong>
window Object의 open Method는 브라우저의 새 창을 열때 사용됩니다. 새창의 모양을 설정하는 부분이 항상 기억이 나지 않아 기록해둡니다.
아래 표는 http://www.w3schools.com 에서 복사했습니다.
Syntax
window.open(URL,name,specs,replace);
Parameter | Description | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
URL | Optional. Specifies the URL of the page to open. If no URL is specified, a new window with about:blank is opened | ||||||||||||||||||||||||||||
name | Optional. Specifies the target attribute or the name of the window. The following values are supported:
|
||||||||||||||||||||||||||||
specs | Optional. A comma-separated list of items. The following values are supported:
|
||||||||||||||||||||||||||||
replace | Optional.Specifies whether the URL creates a new entry or replaces the current entry in the history list. The following values are supported:
|
Example :
window.open(‘http://www.w3schools.com’,”, ‘width=400, height=400, resizable=0, scrollbars=0, status=0’);
window Object 의 showModalDialog Method는 HTML 문서를 Modal Dialog Box로 열때 사용합니다.
MSDN 문서를 참조
Syntax
vReturnValue = object.showModalDialog(sURL [, vArguments] [, sFeatures]);
Parameters
sURL | Required. String that specifies the URL of the document to load and display. |
---|---|
vArguments | Optional. Variant that specifies the arguments to use when displaying the document. Use this parameter to pass a value of any type, including an array of values. The dialog box can extract the values passed by the caller from the dialogArguments property of thewindow object. |
sFeatures | Optional. String that specifies the window ornaments for the dialog box, using one or more of the following semicolon-delimited values:
|
Example :
window.showModalDialog('example.htm','', 'dialogWidth=830px, dialogHeight=600px, resizalbe=0, scroll=0, status=0');
Modal Window에서 부모창(Opener) 제어 :
Modal Window에서 부모창(Opener)을 제어하기 위해서는
showModalDialog() 의 두번째 매개변수에 현재창을 전달해준다.
window.showModalDialog('example.htm',<strong>self</strong>, 'dialogWidth=830px, dialogHeight=600px, resizalbe=0, scroll=0, status=0'); Modal Window 에서 전달된 값을 사용할 수 있다. <strong>var opener = window.dialogArguments;</strong>