CRIZEL
로그인
CRIZEL
프로그래밍 자바스크립트

현재 화면의 가로 세로 값 구하기

고성훈
2025-01-07
const width = window.innerWidth; // 화면의 가로 크기
const height = window.innerHeight; // 화면의 세로 크기
alert(`가로: `+width+`px, 세로: `+height+`px`);