DOM:element.offsetTop
z Mozilla Developer Center, polskiego centrum programistów Mozilli.
UWAGA: Tłumaczenie tej strony nie zostało zakończone.
Może być ona niekompletna lub wymagać korekty.
Chcesz pomóc? | Dokończ tłumaczenie | Sprawdź ortografię | Więcej takich stron...
Spis treści |
[edytuj] Podsumowanie
offsetTop returns the position of the current element relative to the top of the offsetParent node.
[edytuj] Składnia
topPos = element.offsetTop
[edytuj] Parametry
topPosis the number of pixels from the top of the parent element.
[edytuj] Przykład
d = document.getElementById("div1");
topPos = d.offsetTop;
if (topPos > 10 ) {
// object it offset less
// than 10 pixels in its parent
}
[edytuj] Specyfikacja
DOM Level 0. Nie jest częścią żadnego standardu.