SyntaxFix
Write A Post
Hire A Developer
Questions
<select id="ddlViewBy"> <option value="value">text</option> </select>
JQuery
var txt = $("#ddlViewBy option:selected").text(); var val = $("#ddlViewBy option:selected").val();
JS Fiddle DEMO