📌  相关文章
📜  Javascript 获取元素高度和宽度 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:11.688000             🧑  作者: Mango

代码示例1
var width = document.getElementById('myID').offsetWidth;//includes margin,border,padding
var height = document.getElementById('myID'). offsetHeight;//includes margin,border,padding