L
liketofindoutwhy
for the code
var node = document.getElementById("something")
alert(node.offsetWidth)
is very similar to node.clientWidth and node.scrollWidth
I just wonder why offsetWidth is well documented in the Definitive
Javascript book, but clientWidth and scrollWidth are not mentioned at
all, even when all 3 of them work in IE6, IE 7, Firefox 2, and Safari
3.
Also it seems that scrollWidth is always the same as offsetWidth. I
can't make them different by hiding some part of that element so that
one value is smaller and one is larger.
Thanks very much!
var node = document.getElementById("something")
alert(node.offsetWidth)
is very similar to node.clientWidth and node.scrollWidth
I just wonder why offsetWidth is well documented in the Definitive
Javascript book, but clientWidth and scrollWidth are not mentioned at
all, even when all 3 of them work in IE6, IE 7, Firefox 2, and Safari
3.
Also it seems that scrollWidth is always the same as offsetWidth. I
can't make them different by hiding some part of that element so that
one value is smaller and one is larger.
Thanks very much!