Setting Dropdownlist Selected Value by Value based on Text / Value using jQuery.

Vishalneeraj-24503
Posted by Vishalneeraj-24503 under jQuery category on | Points: 40 | Views : 998
Set Dropdownlist Selected Value by Value 
$('#btnValue').click(function()
{
var selectedValue = '5';
$('#ddlprojects option').map(function()
{
if($(this).val() == selectedValue) return this;
}).attr('selected', 'selected');
})

Comments or Responses

Login to post response