javascript get width of a div

JavaScript
document.getElementById("mydiv").offsetWidth
Source

Also in JavaScript: