Ebbene si oggi ho scoperto questa grande verità, infatti se voi scrivete dell’html e settate un’evento IE lo interpreterà correttamente, ma se provate a creare dell’HTML dinamicamente e ad un’elemento proverete a dare il classico
//input è un'elemento DOM
input.setAttribute('onchange','change(this);');non otterrete gli effetti sperati. La spiegazione sta in come IE funziona, non ha i listener e per risolvere il problema bisogna ricorrere a questo escamotage : var ie = document.all ? 1 : 0
if (ie == 1) {
input.onchange = function (evt) {
if( !evt ) { evt = window.event; }
//ottengo l'entità che ha lanciato l'evento
chiamante = evt.srcElement;
};
}Al riguardo qui trovate un articolo al riguardo e qui le DOM properties in generale.EDIT: altro articolo