onInput( )

Adds an event handler that runs when the input element receives input.

A text input receives an input event when a user changes its input value.

You can retrieve the input element's new value by getting the value from the target property of the Event passed to the handler you set using this function.

You can also define an event handler using the Properties and Events panel.

Method Declaration
Method Parameters

eventHandler(): void The name of the function or the function expression to run when the input element receives input.

Return Type:Element
Was this helpful?