Wednesday 28 June 2017

Get SELECT's value and text in jQuery

<select id="ddlViewBy">
    <option value="value">text</option>
</select>
JQuery
var txt = $("#ddlViewBy option:selected").text();
var val = $("#ddlViewBy option:selected").val();

No comments:

Post a Comment

Note: only a member of this blog may post a comment.

Blog Archive