javascript Obj_Button clientHeight, clientWidth
@July 7, 2008, 4:28 a.m.
clientHeight, clientWidth | Firefox/Netscape/NN 7 IE 4 Chrome/Safari/DOM n/a |
|
Read-only |
Broadly speaking, these provide the height and width of the Obj_Button element's content, but with minor variations with respect to element padding among various operating system versions of IE and compatibility modes controlled by the DOCTYPE declaration. Not available for all element types in IE for Macintosh. For Netscape 7, values are zero except when an element's content overflows the viewable area, in which case the values reveal the dimensions of the viewable area (e.g., the browser window's content region for the document.body element). |
|
Example | |
var midHeight = document.body.clientHeight/2; |
|
Value | |
Integer pixel value. |
|
Default | |
0 |
Powered by Linode.