자바스크립트를 이용해 모니터 해상도 구하기
<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>
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개
쉽다zzz
12년 전
감사요~
takumi22
12년 전
감사합니다.
게시판 목록
팁게시판
디자인과 관련된 유용한 정보를 공유하세요.
질문은 상단의 QA에서 해주시기 바랍니다.
질문은 상단의 QA에서 해주시기 바랍니다.
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 5952 | 9년 전 | 300 | ||
| 5951 | 9년 전 | 218 | ||
| 5950 | 9년 전 | 288 | ||
| 5949 | 9년 전 | 443 | ||
| 5948 | 9년 전 | 186 | ||
| 5947 | 9년 전 | 201 | ||
| 5946 | 9년 전 | 193 | ||
| 5945 | 9년 전 | 341 | ||
| 5944 | 9년 전 | 334 | ||
| 5943 | 9년 전 | 421 | ||
| 5942 | 9년 전 | 366 | ||
| 5941 | 9년 전 | 547 | ||
| 5940 | 9년 전 | 427 | ||
| 5939 | 9년 전 | 375 | ||
| 5938 |
씨에이치넷
|
9년 전 | 1292 | |
| 5937 | 9년 전 | 401 | ||
| 5936 | 9년 전 | 362 | ||
| 5935 | 9년 전 | 355 | ||
| 5934 | 9년 전 | 295 | ||
| 5933 | 9년 전 | 711 | ||
| 5932 | 9년 전 | 279 | ||
| 5931 | 9년 전 | 301 | ||
| 5930 | 9년 전 | 485 | ||
| 5929 | 9년 전 | 289 | ||
| 5928 | 9년 전 | 350 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기