1.document.getElementById("id").style.height,这种方法的前提是必须之前已经显示的在css中声明过height,才能取得正确的值
2.document.getElementById("id").clientHeight
3.document.getElementById("id").offsetHeight
原生js如何获取某一元素的高度
原文:https://www.cnblogs.com/wangRong-smile/p/11981126.html