I am developing a webpage where I dynamically set the image to <div>. It works in Firefox, but it does not work in IE.
Question: how to get mouse pointer in IE? I use the following code to get the mouse pointer
function getCursorXY(e) {
CurX = (window.Event) ? e.pageX : event.clientX + (document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft);
CurY = (window.Event) ? e.pageY : event.clientY + (document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop);
}
It works great with Firefox.
source
share