일반적으로 사용되는 항목:
JS 브라우저 창 크기 가져오기
// 창 너비 가져오기
if (window.innerWidth)
winWidth = window.innerWidth
else if ((document. body) && ( document.body.clientWidth))
winWidth = document.body.clientWidth
// 창 높이 가져오기
if (window.innerHeight)
winHeight = window.innerHeight; >else if ( (document.body) && (document.body.clientHeight))
winHeight = document.body.clientHeight
// Document 내부로 들어가서 본문을 감지하고 창 크기를 가져옵니다
if (document.documentElement && document.documentElement.clientHeight && document.documentElement.clientWidth)
{
winHeight = document.documentElement.clientHeight;
winWidth = document.documentElement.clientWidth; 🎜>
세부정보:
다양한 브라우저에 표시되는 창 크기 가져오기 정보:
저자별 최신 기사
-
2025-02-26 03:58:14
-
2025-02-26 03:38:10
-
2025-02-26 03:17:10
-
2025-02-26 02:49:09
-
2025-02-26 01:08:13
-
2025-02-26 00:46:10
-
2025-02-25 23:42:08
-
2025-02-25 22:50:13
-
2025-02-25 21:54:11
-
2025-02-25 20:45:11