Abakada DHTML Demo: onclick Event Handler Example


The onclick event occurs when the user clicks the left mouse button on an object.

This example uses the event to trigger a function that returns the event's srcElement tagName and type.

Click on each of the following objects and anywhere else on this document and see what has been clicked.

    Click me

What's been clicked:

 


View Source   Exit

© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.