Great question.
The specification says:
<!ATTLIST COL -- column groups and properties -- %attrs; -- %coreattrs, %i18n, %events ---
where %events says :
<!ENTITY % events "onclick %Script; #IMPLIED -- a pointer button was clicked -- ondblclick %Script; #IMPLIED -- a pointer button was double clicked-- onmousedown %Script; #IMPLIED -- a pointer button was pressed down -- onmouseup %Script; #IMPLIED -- a pointer button was released -- onmouseover %Script; #IMPLIED -- a pointer was moved onto -- onmousemove %Script; #IMPLIED -- a pointer was moved within -- onmouseout %Script; #IMPLIED -- a pointer was moved away -- onkeypress %Script; #IMPLIED -- a key was pressed and released -- onkeydown %Script; #IMPLIED -- a key was pressed down -- onkeyup %Script; #IMPLIED -- a key was released --" >
So yes, it is assumed that events should be supported for td s.
However, "supposed" is far from "does." The only way to find out is to check in all browsers and hope that it will work in future browsers.
Secondly, just use event delegation and bind once to the parent table . It will work now and forever.
Crescent fresh
source share