s

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

<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개

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

팁게시판

6,077건

디자인과 관련된 유용한 정보를 공유하세요. 질문은 상단의 QA에서 해주시기 바랍니다.

+
제목 글쓴이 날짜 조회
16-03-02 조회 871
16-01-19 조회 503
15-12-23 조회 655
15-12-08 조회 1,302
14-10-30 조회 2,893
14-06-06 조회 2,304
12-08-30 조회 1,513
12-08-20 조회 1,285
12-07-15 조회 2,713
12-07-13 조회 1,489
12-07-06 조회 1,475
12-06-27 조회 1,026
12-06-23 조회 1,145
12-05-03 조회 3,110
12-04-20 조회 2,053
12-03-29 조회 2,374
12-03-22 조회 2,720
12-03-22 조회 1,466
12-03-21 조회 1,294
12-03-11 조회 1,632
12-03-06 조회 1,910
12-02-22 조회 2,248
12-02-17 조회 1,229
12-02-17 조회 4,278
12-02-14 조회 3,900