Getting Selected Value of HTML SELECT using jQuery.

Vishalneeraj-24503
Posted by Vishalneeraj-24503 under jQuery category on | Points: 40 | Views : 257
<select id="Select">
<option value="1">Yes</option>
<option value="2">No</option>
</select>
<input type="button" id="demo" value = "Click" />
<script type="text/javascript">
$("#Click").live("click", function () {
//Get value of the selected option
var selectedValue = $("#Select option:selected").val();
alert(selectedValue);
});
</script>

Comments or Responses

Login to post response