Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

oninput event

oninput event

Event Object Reference Event Object

Example

Execute JavaScript when the user tries to input into the : to try to input to execute JavaScript:

Try it »


Definition and Usage

The oninput event is triggered when the user inputs.

This event is triggered when the or

Tip: This event is similar to onchange the event. The difference is that the oninput event is triggered immediately when the element value changes, while onchange is triggered when the element loses focus. Another difference is that the onchange event can also apply to the element. and , , and


Event Object Reference Event Object