Back to writing
미분류 1 min read HYEONG HWAN, MUN

자바스크립 너비 지정 availHeight, height, clientHeight의 차이

document.writeln("브라우저의 전체 높이",screen.availHeight);

 //이것은 해상도의 높이에서 하단의 퀵런치 만큼의 사이즈만큼 빠지는거구요

 

document.writeln("브라우저의 전체 너비",screen.availWidth);

 //너비는 해상도와 일치할겁니다.

 

document.writeln("모니터의 해상도 높이 ",screen.height);

document.writeln("모니터의 해상도 너비 ",screen.width);

 

document.writeln("브라우저안쪽의 높이 ",document.body.clientHeight);

//이것이 브라우저 안쪽의 높이구요
document.writeln("브라우저안쪽의 너비 ",document.body.clientWidth);

//이것이 브라우저의 안쪽 너비죠