테스트 사이트 - 개발 중인 베타 버전입니다

자바스크립트를 이용해 모니터 해상도 구하기

· 12년 전 · 4134 · 2
<script type="text/javascript">

document.write('가로: ', screen.width, '<br />', '세로: ', screen.height, '<br />');



document.write('<br /><br />'); // 줄바꿈



if ( (screen.width == 1024) && (screen.height == 768) ) {
document.write('평균적인 해상도이군요<br />');
}
else if ( (screen.width < 1024) && (screen.height < 768) ) {
document.write('저해상도이군요.<br />');
}
else if ( (screen.width > 1024) && (screen.height > 768) ) {
document.write('고해상도이군요.<br />');
}
else
document.write('비표준 해상도군요.<br />');

< /script>

댓글 작성

댓글을 작성하시려면 로그인이 필요합니다.

로그인하기

댓글 2개

감사요~
감사합니다.

게시글 목록

번호 제목
11208
11205
11202
11198
11197
17717
11194
11192
11190
17708
20659
20653
17702
17693
11186
20649
11184
11179
11177
11176
20648
20643
20639
11175
11167