//获取DIV
var titleImgDiv = document.getElementById("titleImgDiv");
var titleImgDivStyle = getComputedStyle(titleImgDiv, null);
alert(titleImgDivStyle.paddingBottom);
JS_原生JS获取外边距
最新推荐文章于 2024-01-14 10:38:40 发布
//获取DIV
var titleImgDiv = document.getElementById("titleImgDiv");
var titleImgDivStyle = getComputedStyle(titleImgDiv, null);
alert(titleImgDivStyle.paddingBottom);