Jump to content

onchange is actually onblur


10 weber

Recommended Posts

I'm not sure if this is a question or not, but I'll comment. The change event for a text element is only fired when the focus moves away from the element and the content has changed. Otherwise, it would fire with every keystroke. Since you can trap keystrokes with keydown and keypress, I guess the designers figured it would be also useful to know when the user has committed himself to a change. So that's the change event.

Link to comment
Share on other sites

I'm not sure if this is a question or not, but I'll comment. The change event for a text element is only fired when the focus moves away from the element and the content has changed. Otherwise, it would fire with every keystroke. Since you can trap keystrokes with keydown and keypress, I guess the designers figured it would be also useful to know when the user has committed himself to a change. So that's the change event.
An embarrassing mistake... Thanks!
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...