1

How do I get the text of an item in Listbox by passing the value of that item. I don't need the selected item, only the one I specified by value.

I use jQuery.

Liron Harel
  • 10,819
  • 26
  • 118
  • 217

1 Answers1

1

HTML Code:

<select>
    <option value="1">ayush</option>
</select>


jQuery Code:

var a = $('option[value="1"]').html();
console.log(a);