jQuery get selected option text – How to

by Shine18
jQuery get selected option text

jQuery is a javascript library widely used in website now a days. 97% of the websitse today use jQuery. jQuery contains a load full of methods which vary from animations, document manipulation, request handling, event handling etc. This post will tell you how in jquery get selected option text.

Often people find it confusing on how to get selected option text from a select element. We know that jQuery uses css selectors to select the elements. We can use :selected on the options to get selected option then call .text() method on that element to get selected option text jquery.

$("select option:selected").text();
// will return the selected option text 

Leave a Comment

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More