I read some HTML like:
<script for=foo event=onmouseover> ... </script>
Just wondering what the attributes for=foo event=onmouseover
mean?
I read some HTML like:
<script for=foo event=onmouseover> ... </script>
Just wondering what the attributes for=foo event=onmouseover
mean?
According to the specifications of HTML 4.01/5 and XHTML those attributes are invalid. Also see the W3C specification.
But it turns out that the attributes are proprietary to Internet Explorer, they can be found on MSDN, e.g., in SCRIPT XHTML Element:
EVENT – Specifies the name of the event handler that the enclosed script is bound to
FOR – Specifies the name of the object that the event script is bound to
Two other pages talk about these attributes with more depth: EVENT Attribute and FOR Attribute. Notice that both have a note:
Standards Information
This property is defined in World Wide Web Consortium (W3C) Document Object Model (DOM) Level 2 World Wide Web.
This is, of course, not true.
Also see Attaching an Event Handler, which discusses the various methods with which an event handler can be bound to an element.