JavaScript Reference/Javascript Properties/fromElement — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
|
(нет различий)
| |
Текущая версия на 08:21, 26 мая 2010
"fromElement" Example
<html>
<head>
<script>
function function1() {
alert(event.fromElement.innerText);
}
</script>
</head>
<body><table border="1">
<table>
<tr><td onmouseover="function1();">CELL 1</td></tr>
<tr><td onmouseover="function1();">CELL 2</td></tr>
<tr><td onmouseover="function1();">CELL 3</td></tr>
</table>
</body>
</html>
"fromElement" is applied to
+----------------+--------------------------------------------------------------+
| Applied_To |event |
+----------------+--------------------------------------------------------------+
"fromElement" Syntax and Note
Note:
Read-only property.
Returns the last cursor hovered element before triggering the event.
Syntax:
window.event.fromElement