blob: a00b2322979638c1ec713d50057162f40b38824d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
---
title: Window.resizeTo()
slug: Web/API/Window/resizeTo
tags:
- API
- CSSOM View
- Method
- Reference
- Window
translation_of: Web/API/Window/resizeTo
---
<div>{{APIRef}}</div>
<p><strong><code>Window.resizeTo()</code></strong> 메서드는 동적으로 창의 크기를 변경합니다.</p>
<h2 id="Syntax" name="Syntax">구문</h2>
<pre class="syntaxbox notranslate">window.resizeTo(<em>width</em>, <em>height</em>)
</pre>
<h3 id="Parameters" name="Parameters">매개변수</h3>
<dl>
<dt><code>width</code></dt>
<dd>새로운 {{domxref("window.outerWidth","outerWidth")}}를 나타내는 픽셀 단위 정수. 스크롤 바, 제목 표시줄 등을 모두 포함한 너비입니다.</dd>
<dt><code>height</code></dt>
<dd>새로운 {{domxref("window.outerHeight","outerHeight")}}를 나타내는 픽셀 단위 정수. 스크롤 바, 제목 표시줄 등을 모두 포함한 높이입니다.</dd>
</dl>
<ul>
</ul>
<h2 id="Example" name="Example">예제</h2>
<p>다음 함수는 창의 크기를 화면에서 사용 가능한 크기의 1/4로 설정합니다. {{domxref("Screen.availWidth")}}, {{domxref("Screen.availHeight")}} 속성도 참고하세요.</p>
<pre class="brush:js notranslate">function quarter() {
window.resizeTo(
window.screen.availWidth / 2,
window.screen.availHeight / 2
);
}</pre>
<h2 id="명세">명세</h2>
<table class="standard-table">
<thead>
<tr>
<th scope="col">Specification</th>
<th scope="col">Status</th>
<th scope="col">Comment</th>
</tr>
</thead>
<tbody>
<tr>
<td>{{ SpecName('CSSOM View', '#dom-window-resizeto', 'window.resizeTo()') }}</td>
<td>{{ Spec2('CSSOM View') }}</td>
<td></td>
</tr>
</tbody>
</table>
<h2 id="브라우저_호환성">브라우저 호환성</h2>
<p>{{Compat("api.Window.resizeTo")}}</p>
<h2 id="같이_보기">같이 보기</h2>
<ul>
<li>{{domxref("window.resizeBy()")}}</li>
</ul>
|