자바스크립트를 이용해 모니터 해상도 구하기
<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에서 해주시기 바랍니다.
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 5977 | 9년 전 | 208 | ||
| 5976 | 9년 전 | 245 | ||
| 5975 | 9년 전 | 276 | ||
| 5974 | 9년 전 | 366 | ||
| 5973 | 9년 전 | 414 | ||
| 5972 | 9년 전 | 258 | ||
| 5971 | 9년 전 | 299 | ||
| 5970 | 9년 전 | 249 | ||
| 5969 | 9년 전 | 180 | ||
| 5968 | 9년 전 | 173 | ||
| 5967 | 9년 전 | 357 | ||
| 5966 | 9년 전 | 216 | ||
| 5965 | 9년 전 | 205 | ||
| 5964 | 9년 전 | 202 | ||
| 5963 | 9년 전 | 295 | ||
| 5962 | 9년 전 | 353 | ||
| 5961 | 9년 전 | 264 | ||
| 5960 | 9년 전 | 300 | ||
| 5959 | 9년 전 | 231 | ||
| 5958 |
|
9년 전 | 502 | |
| 5957 | 9년 전 | 340 | ||
| 5956 | 9년 전 | 309 | ||
| 5955 | 9년 전 | 313 | ||
| 5954 | 9년 전 | 229 | ||
| 5953 | 9년 전 | 371 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기