pacman pacman - 1 month ago 15
HTML Question

What is the difference between onBlur and onChange attribute in HTML?

When is one called versus the other? Is there a situation were onChange would be called but onBlur would not be called?

Answer

The onBlur event is fired when you have moved away from an object without necessarily having changed its value.

The onChange event is only called when you have changed the value of the field and it loses focus.

You might want to take a look at quirksmode's intro to events. This is a great place to get info on what's going on in your browser when you interact with it. His book is good too.