IE doesn't support the target property, they use srcElement instead.
Change:
if (e.target.id != 'show_calender')
to:
if ((e.target || e.srcElement).id != 'show_calender')
You may also need to add this to the beginning of your function:
if (!e) e = window.event
Your final code would look like this:
function check(e) {
if (!e) e = window.event;
var obj = document.getElementById('calendar_widget');
if (obj != 'null') {
if ((e.target || e.srcElement).id != 'show_calender')
obj.style.display='none';
}
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…