Source Code:
(back to article)
Submit
Result:
Report an issue
<!DOCTYPE html> <html> <head> <title>Title of the Document</title> </head> <body> <button id="buttonId">Click</button> <script> buttonId.addEventListener('click', { handleEvent(event) { alert(event.type + " at " + event.currentTarget); } }); </script> </body> </html>