Front-End - Main Menu/html5 + CSS3 + JavaScript (종합 예제)

ex10_05 - window 크기 조정 (비사용권고)

ITRecipe 2023. 2. 28. 10:03
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<title>window 크기 조정</title>
</head>
<body>

<h3>윈도우의 위치와 크기 조절</h3>
<hr/>

<button type="button" onclick="window.moveBy(-10, 0)">left</button>
<!-- moveBy(toRight, toDown) -->
<button type="button" onclick="window.moveBy(10, 0)">right</button>
<button type="button" onclick="self.moveBy(0, -10)">up</button>
<button type="button" onclick="moveBy(0, 10)">down</button>
<button type="button" onclick="resizeBy(10, 10)">+</button>
<!-- resuzeBy(addW, addH)는 넓이와 높이  -->
<button type="button" onclick="resizeBy(-10, -10)">-</button>

<!-- window, window.self, self, 생략 해서 함수 사용  -->
<!-- 이 예제는 익스플로러에서는 잘 실행되지만, Chrome에서는 보안의 이유로 전혀 실행되지 않고,
Edge에서는 크기 조절만 가능하다. (비사용권고)
 -->


</body>
</html>

'Front-End - Main Menu > html5 + CSS3 + JavaScript (종합 예제)' 카테고리의 다른 글

ex10_07 - print 함수  (0) 2023.02.28
ex10_06 - scroll함수  (0) 2023.02.28
ex10_04 - setInterval함수  (0) 2023.02.28
ex10_03 - setTimeout 함수 사용  (0) 2023.02.27
ex10_02 - window close  (0) 2023.02.27