HTML oninput Attribute
HTML oninput Attribute
The oninput attribute fires when an element gets user input. The oninput event fires when the value of an input or textarea element is changed. It is much similar to onchange event but the difference is that oninput event occurs when the element value changes while in the case of onchange attribute the event occurs when the element loses focus. Moreover, onchange works with select elements.
Used With:-
Elements | Event |
---|---|
All elements in HTML | oninput |
Syntax:-
Its syntax is:- < element oninput="your_script" >