Phong Duong


onchange vs oninput

17-04-2021 | #javascript

I sometimes get confused with onchange and oninput event. So I create this tutorial to show how they are different.

input event fires every time you change the element's value.

change event fires after you commit the change of the element's value, when you click outside of the element or switch the focus to a different control.

Share: TwitterFacebookLinkedInHacker News