I have an HTML control:
<select id="grade">
I want to get the selected value of dropdown on selected Index changed event.
I tried to add following code which would be called on drop down selection change, but seems it doesnot work. Any other suggestion ?
$("#grade").on('change', function() {
alert("hi");
});
Also, how can I get the selected value in Java Script.
Here is an alternative for those who don't need jQuery:
<select id="grade" onchange="OnGradeChanged(this.value);">
<option value="1">1</option>
<option value="2">2</option>
</select>
<script>
function OnGradeChanged(value){
alert(value);
}
</script>