OLD | NEW |
1 <!-- | |
2 @MAC-DENY:AXLayoutComplete* | |
3 --> | |
4 <!DOCTYPE html> | 1 <!DOCTYPE html> |
5 <html> | 2 <html> |
6 <body> | 3 <body> |
7 <select> | 4 <select> |
8 <option>Apple</option> | 5 <option>Apple</option> |
9 <option>Orange</option> | 6 <option>Orange</option> |
10 <option>Banana</option> | 7 <option>Banana</option> |
11 </select> | 8 </select> |
12 <script> | 9 <script> |
13 document.querySelector('select').focus(); | 10 document.querySelector('select').focus(); |
14 function go() { | 11 function go() { |
15 var comboBox = document.querySelector('select'); | 12 var comboBox = document.querySelector('select'); |
16 var clickEvent = document.createEvent('MouseEvents'); | 13 var clickEvent = document.createEvent('MouseEvents'); |
17 clickEvent.initMouseEvent('mousedown', true, true, window); | 14 clickEvent.initMouseEvent('mousedown', true, true, window); |
18 comboBox.dispatchEvent(clickEvent); | 15 comboBox.dispatchEvent(clickEvent); |
19 } | 16 } |
20 </script> | 17 </script> |
21 </body> | 18 </body> |
22 </html> | 19 </html> |
OLD | NEW |