<select id="ddlViewBy">
<option value="value">text</option>
</select>
JQuery
var txt = $("#ddlViewBy option:selected").text();
var val = $("#ddlViewBy option:selected").val();
More Related Contents:
- jQuery Adding new option to select element doesn't pick up the string [closed]
- jQuery get value of select onChange
- Why does the jquery change event not trigger when I set the value of a select using val()?
- Use jQuery to change a second select list based on the first select list option
- Click event on select option element in chrome
- jQuery: Best practice to populate drop down?
- Auto resizing the SELECT element according to selected OPTION’s width
- Best way to unselect a in jQuery?
- How to make the first option of selected with jQuery
- Selecting text on focus using jQuery not working in Safari and Chrome
- Populate Select box options on click with Javascript/Jquery with Json data
- Get index of selected option with jQuery
- Jquery- Get the value of first td in table
- Disable select options based on value *through the HTML only!*
- Unselect what was selected in an input with .select()
- jQuery onchange/onfocus select box to display an image?
- JQuery :contains function limit to exact match
- How can I convince IE to simply display application/json rather than offer to download it?
- How to trigger click event on href element
- Using jQuery to build table rows from AJAX response(json)
- Get data from file input in JQuery
- jQuery & Prototype Conflict
- How to send request parameter array to servlet using jQuery $.ajax?
- jQuery multiselect drop down menu
- Ajax – How refresh after submit
- How can I create a “Please Wait, Loading…” animation using jQuery?
- Trigger a select form element to show its options (open drop down options list) with Javascript
- jQuery serialize / serializeArray from an element that is not a form
- jQuery: check if element has CSS attribute
- Regex validation for numbers with comma separator