Been a while since I’ve posted here, but I’ve been fiddling and learning jQueryMobile, and I’ve a question with regard to assigning a value to an option within a select menu.
Basically, what purpose does assigning a value serve? The select menu will work regardless, it seems.
To illustrate below in code, I’ve assigned values to the first menu, and no values to the second.
I probably already know the answer to this question and I’ll most likely feel a litte dumb when someone answers it, but better safe than sorry!
<div data-form="fieldcontain">
<form>
<label for="lang">Languages you like</label>
<select id="lang" name="lang" multiple data-theme="e"> <!-- Use the data-theme element here to change the color -->
<option value="1">C/C++</option>
<option value="2">Objective-C</option>
<option value="3">Java</option>
<option value="4">C#</option>
<option value="5">Visual Basic</option>
<option value="6">Action Script</option>
<option value="7">Delphi</option>
<option value="8">Python</option>
<option value="9">JavaScript</option>
<option value="10">Ruby</option>
<option value="11">PHP</option>
</select>
</form>
</div>
<div data-form="fieldcontain">
<form>
<label for="cars">Cars</label>
<select id="cars" name="cars" blank>
<optgroup label="American">
<option>Jeep</option>
<option>Ford</option>
<option>Dodge</option>
<option>Chevy</option>
</optgroup>
<optgroup label="German">
<option>Mercedes-Benz</option>
</optgroup>
</select>
</form>
</div>