Friday, December 04, 2009 #

Jquery dropdown selected value

 

Today we had a little situation where to get the selected text of Dropdown in Jquery. As far as I know we can get only the value as given below

$("#somedrop").val()

 

This gives the selected value. I did a little google and found a helpful text in discussion forums . The answer will be simple.

 

$("#somedrop option:selected").text()

 

Please let me know if you have some other ways also.

 

Thanks,

Thani

  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

Posted On Friday, December 04, 2009 1:08 AM | Feedback (1)