This attribute works when it gets user input value. This attribute mainly fires when the user change the value of <input> and <textarea> element. This attribute is quite similar to onchange attribute but the basic difference is that the oninput event attribute occure immediately when the value of element changes while the onchange attribute occurs when the element loses Focus. The other difference is that onchange attribute also works with <select> element.
<element oninput = "script">
Attribute Value: This attribute contains value script and it works when oninput event triggered. This attribute is supported by many HTML tags: <input type=”password”>, <input type=”search”, <input type=”text”> and <textarea>.
Supported Browsers: The browser supported by oninput event attribute are listed below:
- Apple Safari 5.0
- Google Chrome
- Firefox 4.0
- Internet Explorer 9.0