Deselect all options:
document.getElementById("mySelect").selectedIndex = "-1";
Click the button to deselect options.
<!DOCTYPE html> <html> <body> <select id="mySelect"> <option>Apple</option> <option>Orange</option> <option>Pineapple</option> <option>Banana</option> </select>// w w w . jav a 2s . com <button onclick="myFunction()">Test</button> <script> function myFunction() { document.getElementById("mySelect").selectedIndex = "-1"; } </script> </body> </html>