728x90
반응형
JavaScript 현재 디스플레이 해상도 출력하기 !!
<h2>JavaScript 현재 디스플레이 해상도 출력하기 !!</h2>
<p id="width"></p>
<p id="height"></p>
<script>
document.getElementById("width").innerHTML = "width의 높이는 " + screen.width + " 입니다.";
document.getElementById("height").innerHTML = "height의 높이는 " + screen.height + " 입니다.";
</script>
결과값
JavaScript 현재 디스플레이 해상도 출력하기 !!
728x90
반응형
'Coding > JavaScript' 카테고리의 다른 글
[JavaScript] 현재 날짜와 시간 함수 사용법 new Date() - 년, 월, 일, 시, 분, 초 (0) | 2022.02.08 |
---|---|
[JavaScript] Prompt() 함수로 입력창 띄우기 & 텍스트 출력 하기!! (0) | 2021.08.12 |
[JavaScript] if문으로 나이 체크하기 !! (0) | 2021.07.30 |
[JavaScript] 불리언(Boolean) Type True // false 비교하기 !! (0) | 2021.07.30 |
[JavaScript] Math.random() 함수를 사용하여 랜덤 숫자 출력하기 !! (0) | 2021.07.29 |
댓글