December 2013
Intermediate to advanced
384 pages
9h 54m
English
var value = $("#singleSelect").val(); var values = $("#multiSelect").val(); . . . $("#singleSelect").val("one"); $("#multiSelect").val(["two", "three"]);
Select inputs are really container inputs for a series of <option> elements. The value of the select element is the value(s) of the currently selected option(s). Once again, the submission and serialization in jQuery and JavaScript handle this automatically for you. However, doing it manually requires a bit of code.
Read now
Unlock full access