How to get selected option value using jquery?

To get selected option value of select HTML tag use option:selected property.
<select id=”selectid”>

<option value=’1′>One</option>

<option value=’2′>Two</option>

<option value=’3′>Three</option>

<option value=’4′>Four</option>

</select>

<script>

$(‘#selectid option:selected’).attr(‘value’);

</script>

Leave a Reply

Your email address will not be published. Required fields are marked *