자바스크립트를 이용해 모니터 해상도 구하기
<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년 전
감사합니다.
게시글 목록
| 번호 | 제목 |
|---|---|
| 20579 | |
| 20572 | |
| 20569 | |
| 20563 | |
| 11083 |
jQuery
마우스 오버시 레이어 출력~
2
|
| 11080 |
jQuery
메뉴 고정
2
|
| 11078 | |
| 20557 | |
| 20162 | |
| 20549 | |
| 20542 | |
| 20525 | |
| 20522 | |
| 11071 |
jQuery
facebook timeline 스타일 따라하기
6
|
| 11067 | |
| 20519 | |
| 20504 | |
| 20500 | |
| 11062 | |
| 20497 | |
| 20493 | |
| 11056 | |
| 11050 |
JavaScript
html 테그 제거하는 함수
5
|
| 11046 |
JavaScript
새로고침(F5) 금지 하는 자바 스크립트
3
|
| 11043 |
JavaScript
자바스크립트 문자열 비교
2
|
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기