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

Show select element dropdown

$
0
0

I thought this code should show the select element's dropdown list?

var event = document.createEvent('MouseEvents');
 event.initMouseEvent('mousedown',
     true, true, window, 1, 0, 0,
     1, // clientx
     1, // clienty
     false, false, false, false, 0, null);
selectElement.dispatchEvent(event);

but it doesn't. What's wrong with my code?


Viewing all articles
Browse latest Browse all 3527

Trending Articles



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