这是与我的问题有关的 JSFiddle。http://jsfiddle.net/kane/MFJUv/
我尝试了几件事来显示/隐藏下拉列表(div id:machinedropdown)。
在加载时,我希望隐藏机器下拉菜单,但是当用户选择“机器”单选按钮时,它需要显示。任何人都可以为我建议一个解决方案吗?
<div data-role="content" id="radio"
<form>
<fieldset data-role="controlgroup" data-type="horizontal" class="center-controlgroup">
<input name="radio-choice-h-6" id="radio-choice-h-6a" type="radio" checked="checked" value="on">
<label for="radio-choice-h-6a">Run</label>
<input name="radio-choice-h-6" id="radio-choice-h-6b" type="radio" value="off">
<label for="radio-choice-h-6b">Swim</label>
<!-- ON SELECT I NEED TO HIDE THE "div id = "machinedropdown" -->
<input name="radio-choice-h-6" id="radio-choice-h-6c" type="radio" value="off">
<label for="radio-choice-h-6c">Machine</label>
</fieldset>
</form>
</div>
<div data-role="content" id="machinedropdown"
<label class="select" for="select-choice-1">Select, native menu</label>
<select name="select-choice-1" id="select-choice-1">
<option value="standard">Machine 1</option>
<option value="rush">Machine 2</option>
<option value="express">Machine 3</option>
<option value="overnight">Machine 4</option>
</select>
</div>