Answers for "select get selected option text"

2

jquery select option by text

$("#myDropdown option:contains(Option 2)").attr('selected', 'selected');
Posted by: Guest on June-16-2020
0

get selected text

const getSelectedText = () => window.getSelection().toString();
Posted by: Guest on October-04-2021

Code answers related to "select get selected option text"

Code answers related to "Javascript"

Browse Popular Code Answers by Language