0

Is there any precedence to the JavaScript events that occur in a HTML page? For example:

Consider these two events onchange and onblur.

Change the text of a text box. The event onchange occurs only onblur of the text box. In this case which event will be processed first.

I hope I gave the understandable example.

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
Puru
  • 8,913
  • 26
  • 70
  • 91

2 Answers2

0

I've just tested it on firefox and the onChange event occurs before the onBlur, but the onChange is fired only when you really change the input value. Anyway there is always a certain order in events occurance.

mck89
  • 18,918
  • 16
  • 89
  • 106
0

onChange, occurs first, if this is what you are asking

Starx
  • 77,474
  • 47
  • 185
  • 261