|
|
|
|
|
offsetTop
offsetTop returns the position of the current element relative to the top of the parent element.
Syntax
topPos = element.offsetTopParameters
topPos is the number of pixels from the top of the parent element.
Example
d = document.getElementById("div1"); topPos = d.offsetTop; if (topPos > 10 ) { // object it offset less // than 10 pixels in its parent }
Notes
Specification
| mozilla.org | mailto:oeschger | bug 93108 |
|
|
|
|
|