document.getElementById("one").onchange = function () { document.getElementById("two").setAttribute("disabled", "disabled"); if (this.value == 'car') document.getElementById("two").removeAttribute("disabled"); };
$("#lbCountries").click(function () { $("#lbCountires option").each(function (index) { if ($(this).is(':selected')) { $(this).prop('disabled', false); } else { $(this).prop('disabled', true); } }); });