InputEvent data attribute
Definition and Usage
The 'data' attribute returns the characters inserted with the event.
Note:This property is read-only.
Example
Return input data from the text field:
function myFunction(event) { var x = event.data; }
Syntax
event.data
Technical Details
Return Value: | A string value indicating the character to be inserted. |
---|
Browser Support
Properties | Chrome | IE | Firefox | Safari | Opera |
---|---|---|---|---|---|
data | 60 | Not Supported | Not Supported | Supported | Supported |