why IE have so many problem ????? it waste lots of time.....
Updated code :
function getElements()
{
var x=document.getElementsByTagName("option");
var el = document.getElementById('selectDept');
el.onmouseover = function( myevent ) {
// event = event || window.event.srcElement;
if(myevent && myevent.target){
if ( myevent.target.tagName.toLowerCase() == 'option' ) {
alert(myevent.target.innerHTML);
}
}
else if(window.event)
{
if ( window.event.srcElement.tagName.toLowerCase() != 'select' ) {
alert('s');
}
}
};
but still not work in IE.