TextEvent: data property
UI Events
UI Events
The data read-only property of the TextEvent interface returns the last character added to the input element.
Value
A string representing the event data.
For textInput events, this is the character that was last entered.