var divWidth = document.getElementsByClassName("myDiv")[0].clientWidth;. divWidth will now be equal to the the width of the first element in your div array.
確定! 回上一頁