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 selected>Apple</option> | 5 <option selected>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 // Setting |selectedIndex| to -1 unselects any selected item. | 12 // Setting |selectedIndex| to -1 unselects any selected item. |
16 document.querySelector('select').selectedIndex = -1; | 13 document.querySelector('select').selectedIndex = -1; |
17 } | 14 } |
18 </script> | 15 </script> |
19 </body> | 16 </body> |
20 </html> | 17 </html> |
OLD | NEW |