JavaScript Reference/Javascript Properties/toElement — различия между версиями

Материал из Web эксперт
Перейти к: навигация, поиск
 
м (1 версия)
 
(нет различий)

Текущая версия на 08:21, 26 мая 2010

"toElement" Example

    
<html>
<head>
<script>
    function alertMe() {
        alert(event.toElement.innerText);
    }
</script>
</head>
<body>
<table border="1">
<tr><td onmouseover="alertMe();">CELL 1</td></tr>
<tr><td onmouseover="alertMe();">CELL 2</td></tr>
<tr><td onmouseover="alertMe();">CELL 3</td></tr>
</table>
</body>
</html>



"toElement" is applied to

+----------------+--------------------------------------------------------------+
| Applied_To     |event                                                         |
+----------------+--------------------------------------------------------------+



"toElement" Syntax and Note

Note:
Read-only property. 
When you move the mouse across a page, the onmousemove, onmouseover, and 
onmouseout events are triggered every time you enter the region of an element. 
This property returns the element that is directly underneath 
the mouse pointer.
    
Syntax:
    
window.event.toElement