want attachEvent Replacement in win7 IE11

721 Views Asked by At
            else {
                oStatus.attachEvent("onmouseover", function(){getCoordinates(oStatus)});
                oStatus.innerHTML="<class='SHOW'>Status: <b>New</b>. Click <a class='customlink' href='javascript:startHere();'><span id='here'>here</span></a> to start.";
                }

//I got the error: "Object does not support property or method 'attachEvent'"

Can any one help me for IE11 fixing this issue

1

There are 1 best solutions below

0
On

Use the DOM standard addEventListener, just as you would in any other browser. IE has supported it since IE9.

element.addEventListener('mouseover', function (event) { });