clientWidth
Property of dom/HTMLElementdom/HTMLElement
Syntax
var result = element.clientWidth;
element.clientWidth = value;
Examples
This example shows how the clientWidth property and the offsetWidth property measure document width differently. The width of the div is set to 200, and this is the value retrieved by the offsetWidth property, not the clientWidth property.
<DIV ID=oDiv STYLE="overflow:scroll; width:200; height:100"> . . . </DIV>
<BUTTON onclick="alert(oDiv.clientWidth)">client width</BUTTON>
<BUTTON onclick="alert(oDiv.offsetWidth)">offset widthY</BUTTON>
Syntax
Attributions
Microsoft Developer Network: [Windows Internet Explorer API reference Article]