|
Since onClick events react to a link being clicked on, they are naturally inserted inside the <a> tag. Now get ready for something that breaks all the rules. The onerror event, unlike most event handlers, is not inserted inside any tag. It can't, since there doesn't exist a "window" tag. Since no such tag exists in HTML, the creators of JavaScript had to devise an alternate way of declaring this event, and the syntax is as follows:
|