Answers for "hide selected option from dropdown"

1

hide select tag dropdown caret

appearance: none;
-webkit-appearance: none;
-moz-appearance: none;

/* For IE <= 11 */
select::-ms-expand {
   display: none;
}
Posted by: Guest on October-16-2020
0

selected dropdown value

Plain JavaScript:
===================
var e = document.getElementById("elementId");
var value = e.options[e.selectedIndex].value;
var text = e.options[e.selectedIndex].text;
---------------------------------------------------------
jQuery:
=======
$("#elementId :selected").text(); // The text content of the selected option
$("#elementId :selected").val(); // The value of the selected option
Posted by: Guest on July-17-2020

Code answers related to "hide selected option from dropdown"

Browse Popular Code Answers by Language