InputEvent data Property
Example
Return the input data from a text field:
function myFunction(event) {
var x = event.data;
}
Try it Yourself »
Definition and Usage
The data
property returns the character that
was inserted with the event.
Note: This property is read-only.
Browser Support
Property | |||||
---|---|---|---|---|---|
data | 60 | Not supported | Not supported | Yes | Yes |
Syntax
event.data
Technical Details
Return Value: | A String, indicating which character that was inserted |
---|