Click here to Skip to main content
15,886,362 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hi Team,

In my month column i have a data as follows:
june
july
and so on ...
i am getting the value
nqiSqiEntity.Month = $('#monthSelect').val();

it gives me value
I want the text ie: June,July not value ie: 1,2 of text from the dropdown in Jquery:

i have try this
nqiSqiEntity.Month = $('#monthSelect').text(); but its give me all the data from month column

Kindly suggest
how to get the text instead of value.

Thanks in advance
Harshal
Posted
Comments
SRS(The Coder) 18-Jul-14 5:10am    
Nice dude...

1 solution

This is it.

nqiSqiEntity.Month = $('#monthSelect option:selected').text();
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900