/ Published in: JavaScript
                    
                                        
                            
                                Expand |
                                Embed | Plain Text
                            
                        
                        Copy this code and paste it in your HTML
var dropdown = document.getElementById('myDropdown');
var index = dropdown.selectedIndex;
var value = dropdown[index].value;
Comments
 Subscribe to comments
                    Subscribe to comments
                
                