<select style="width:100%" class="select" id="Days" name="Days" multiple="multiple"> <option value='Sunday'>Sunday</option> <option value='Monday'>Monday</option> <option value="Tuesday">Tuesday</option> <option value="Wednesday">Wednesday</option> <option value="Thursday">Thursday</option> <option value="Friday">Friday</option> <option value="Saturday">Saturday</option> </select>
var days='Sunday'; $('#Days').val(days);
var selectedDays = ['Sunday', 'Monday']; $('#Days option').each(function (a, option) { option.selected = selectedDays.indexOf(option.value) > -1; });
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)