'toElement' Example : toElement « Javascript Properties « JavaScript Reference

'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>

    
      
      








Related examples in the same category

1.'toElement' Syntax and Note
2.'toElement' is applied to