Event.targetName

The ID of the form control for which the event was detected.

Property of Event
Read-only

Example

If the below code is added into the Global MetaScript for a form that has two buttons (with IDs "b1" and "b2") and either button is clicked, an alert that displays the ID of the clicked button will appear:

See also

Button.addEventListener

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.