$("#selectAllButt").click(function() { $("#mySelectList option").each(function() { $(this).attr("selected","selected"); }); });
The following code will programmatically UN-Select all the options in a multiple-option Select box.
$("#selectNoneButt").click(function() { $("#mySelectList option").each(function() { $(this).removeAttr("selected"); }); });
No comments:
Post a Comment