Javascript examples for DOM:Event
Use caller.arguments[] to get event trigger
<html lang="en"> <head> <title> mrmoje</title> <style> div{cursor:pointer} div:hover{text-decoration:underline} </style> </head> <body translate="no"> <div onclick="myHandler()" id="my element's id"> Click Here//from w w w .j a v a 2s. co m </div> <script> function myHandler(){ console.log(myHandler.caller.arguments[0].target.id) } </script> </body> </html>