Introduction : This tutorial explain how to display dropdownlist data and select these data on onchange event
Select Dropdownlist Data
<script src="/Scripts/jquery-1.8.2.min.js"></script>
<script type="text/javascript">
$(document).ready(function () {
$("#Selected").click(function () {
alert($('#countryid').val());
});
});
</script>
<select id="countryid">
<option value="None">---- Select----</option>
<option value="India">India</option>
<option value="US">US</option>
<option value="Lanka">Lanka</option>
</select>
<br />
<input type='button' value='Display Selected' id='Selected'>
<script type="text/javascript">
$(document).ready(function () {
$("#Selected").click(function () {
alert($('#countryid').val());
});
});
</script>
<select id="countryid">
<option value="None">---- Select----</option>
<option value="India">India</option>
<option value="US">US</option>
<option value="Lanka">Lanka</option>
</select>
<br />
<input type='button' value='Display Selected' id='Selected'>
Sign up here with your email
ConversionConversion EmoticonEmoticon