Здравствуйте, Аноним, Вы писали:
А>Как определить координаты объекта (картинки, таблицы, ячейки) относительно окна.
<html>
<head>
<title>Untitled</title>
</head>
<script>
function getOffset(el, which) {
var amount = el["offset" + which]
el = el.offsetParent
while (el != null) {
amount += el["offset" + which]
el = el.offsetParent
}
return amount
}
</script>
<body>
<table border="1" width="100%">
<tr>
<td onmouseover="alert(getOffset(this, 'Top')); alert(getOffset(this, 'Left'));>Test1</td>
</tr>
</table>
</body>
</html>