Answers for "jquery to get the text of select"

2

get text selected option jquery

$('#id option:selected').text()
Posted by: Guest on December-16-2019
8

select option value jquery

$("select.country").change(function(){
  var selectedCountry = $(this).children("option:selected").val();
  alert("You have selected the country - " + selectedCountry);
});
Posted by: Guest on February-19-2020

Code answers related to "jquery to get the text of select"

Code answers related to "Javascript"

Browse Popular Code Answers by Language