dave: DOM Events Chrome und Opera

Beitrag lesen

Hi,

mit else.

  
  if(window.event)  
    {  
    var el  = window.event.srcElement;  
    var clickID = el.getAttribute('id');  
    alert('M$ Event Model: ' +clickID +' ' +nav);  
    }  
  
  else if(document.addEventListener)  
    {  
    var clickID = event.target.getAttribute('id');  
    alert('DOM Event Model: ' +clickID +' ' +nav);  
    }  
  }

~dave