2009-09-10 10 views

risposta

3

Ottima domanda.

The spec dice:

<!ATTLIST COL       -- column groups and properties -- 
    %attrs;        -- %coreattrs, %i18n, %events --- 

dove %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 --" 
    > 

Quindi sì, sembra eventi sono suppone di essere sostenuti per le td s.

Tuttavia "supposto" è molto diverso da "fa". L'unico modo per sapere è di testare su tutti i browser e spero che funzioni anche nei browser futuri.

In secondo luogo, è sufficiente utilizzare event delegation e associare una volta al genitore table invece. Funzionerà ora e sempre di più.

Problemi correlati