Try selecting different options and clicking debug:

$(function() {
        $("#debug").click(function() {
                var selected = $("#state [EMAIL PROTECTED]");
                alert(selected.text() + " : " + selected.val());
        });
});

<select name="state" id="state">
        <option value="NY">New York</option>
        <option value="AL">Alaska</option>
</select>

<button id="debug">Debug</button>

Adrian

On Oct 26, 5:29 pm, BuckRogers <[EMAIL PROTECTED]> wrote:
> How do I go about retreiving the selected value of a dropdown list
> using jquery?
>
> In regular js I do this :
>
> <select onchange="f(this.selectedIndex)">
> <option></option>
> <option></option>
>
> </select>

Reply via email to