var myDiv = document.getElementById("chooseRect"); var computedStyle = document.defaultView.getComputedStyle(myDiv, null); console.log(computedStyle.width ); VM33412:3 20px
var myDiv = document.getElementById("chooseRect"); var computedStyle = document.defaultView.getComputedStyle(myDiv, null); console.log(computedStyle.width ); VM33412:3 20px
转载于:https://www.cnblogs.com/zfdai/p/5390290.html