웹페이지 높이값 구하기

 

            let body = document.body,
                html = document.documentElement;

            let height = Math.max(
				body.scrollHeight
				, body.offsetHeight
				, html.clientHeight
				, html.scrollHeight
				, html.offsetHeight
			);

            console.log("body.scrollHeight:",body.scrollHeight);
            console.log("body.offsetHeight:",body.offsetHeight);
            console.log("html.clientHeight:",html.clientHeight);
            console.log("html.scrollHeight:",html.scrollHeight);
            console.log("html.offsetHeight:",html.offsetHeight);

            console.log("Height:" + height);