title: How get element width by javascript
body: <p>what's the JavaScript code for the find the 's width?</p>
  
  <p>(I want get width <code>.FixedBox</code> whit javascript no jquery, but my code don't work.)</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>alert(document.getElementsByClassName('FixedBox').offsetWidth);</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="FixedBox"&gt;
      The HTMLElement.offsetWidth read-only property returns the layout width of an element. Typically, an element's offsetWidth is a measurement which includes the element borders, the element horizontal padding, the element vertical scrollbar (if present, if rendered) and the element CSS width.
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>