<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>BOM</title>
</head>
<body>
<ul>
<li id="ih">
window.innerHeight : 툴바를 제외한 높이 >
</li>
<li id="iw">
window.innerWidth : 스크롤바를 포함한 너비 >
</li>
</ul>
<script>
let ih = window.innerHeight;
let iw = window.innerWidth;
document.getElementById('ih').innerText += ih;
document.getElementById('iw').innerText += iw;
</script>
</body>
</html>
'HTML.CSS.JS > JS' 카테고리의 다른 글
[JS] day13_구구단 게임 (0) | 2023.04.20 |
---|---|
[JS] day13_window_popup 팝업창 (0) | 2023.04.20 |
[JS] day13_fetch json데이터 가져와서 원하는 모양으로 출력하기 (0) | 2023.04.20 |
[JS] day13_non_standard 비표준 속성 (0) | 2023.04.20 |
[JS] day13_async_promiseChain 데이터 가져오기 2 (0) | 2023.04.20 |