Event to Element : Event Properties « Event « JavaScript DHTML
- JavaScript DHTML
- Event
- Event Properties
Event to Element
<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