반응형

브라우저 객체(BOM)의 screen 객체 메소드


내용이 많지 않아 코드 내에 주석으로 설명 내체 하였습니다.





1
2
3
4
5
6
7
8
9
10
11
12
13
var scr_width = screen.width;           // 화면 너비
var scr_height = screen.height;         // 화면 높이
var scr_avaWidth = screen.availWidth;   // 화면 사용 가능 너비
var scr_avaHeight = screen.availHeight; // 화면 사용 가능 높이
var scr_colorDepth = screen.colorDepth; // 표현 가능 컬러 bit
var scr_pixelDepth = screen.pixelDepth; // 표현 가능 픽셀 bit
 
console.log("화면 너비 : " + scr_width);
console.log("화면 높이 : " + scr_height);
console.log("화면 사용 가능 너비 : " + scr_avaWidth);
console.log("화면 사용 가능 높이 : " + scr_avaHeight);
console.log("표현 가능 컬러 bit : " + scr_colorDepth);
console.log("표현 가능 픽셀 bit : " + scr_pixelDepth);




결과 : 



반응형

+ Recent posts