Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE HTML>
<html>
<body>
<div style="position:fixed; top:100px;" id="d">hello</div>
<script>
document.write(document.getElementById("d").offsetTop);
</script>
</body>
</html>