Quantcast
Channel: Internet Explorer Web Development forum
Viewing all articles
Browse latest Browse all 3527

document.createEvent("MouseEvents") is working for IE9 and Firefox, but can't for IE8!!!

$
0
0

Is any one can tell me what is the way that can I replace it for IE 8 browser ? thanks!

I need to simulate mouse click on the specific element,

the below code are all working in IE9 and firefox, but IE8 can't support document.createEvent, So Is there any other method I can use ?

var evt1 = document.createEvent("MouseEvents");
                      evt1.initMouseEvent("click", true, true, window,
                        0, 0, 0, 0, 0, false, false, false, false, 0, null);

document.activeElement.dispatchEvent(evt1);


Viewing all articles
Browse latest Browse all 3527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>