JavaScript Tutorial/Event/srcElement
Содержание
Get event source element name and id
<source lang="javascript">
<html> <head> <title>A Simple Page</title> <script language="JavaScript">
</script> </head> <body onMouseover="tagInfo()" id="body1">
Heading One
Some text
Another heading
More text and some bold text
Another heading
More text and some italics text
</body> </html></source>
window.event.srcElement.tagName
<source lang="javascript">
<html> <head> <title>A Simple Page</title> <script language="JavaScript">
</script> </head> <body onMouseover="tagInfo()">
Heading One
Some text
Another heading
More text and some bold text
Another heading
More text and some italics text
</body> </html></source>