lovespring
lovespring

Reputation: 19559

Javascript event execution order

What is the execution order of inline events, attachEvent handlers, and an <a> tag's href navigation?

Upvotes: 0

Views: 1218

Answers (2)

Ben
Ben

Reputation: 16533

Try it yourself: http://jsfiddle.net/rhJ2f/

Upvotes: -1

SLaks
SLaks

Reputation: 887195

The execution order of individual event handlers is undefined.

If none of the event handlers called e.preventDefault(), and if onclick didn't return false, a navigation will occur.

Upvotes: 2

Related Questions