使用jQuery Mobile和Horizontal无线电字段集显示在:
http://demos.jquerymobile.com/1.4.3/checkboxradio-radio/#Horizontalgroup
将两个(或多个)不同的无线电组写入单个字段集的正确方法是什么(如果可能)。将多个水平无线电组写入单个字段集对我来说似乎很奇怪。我不确定我是否正确使用了所有元素。
<div data-role="page" id="test">
<div data-role="content">
<div data-role="fieldcontain">
<div class="ui-body ui-body-a ui-corner-all">
<fieldset data-role="controlgroup" data-theme="a" data-type="horizontal">
<legend>FieldSet Name:</legend>
<div class="ui-field-contain">
<legend>Question 1:</legend>
<input type="radio" name="radio-choice-1" id="radio-choice-1-no" value="1">
<label for="radio-choice-1-no">No</label>
<input type="radio" name="radio-choice-1" id="radio-choice-1-yes" value="2">
<label for="radio-choice-1-yes">Yes</label>
</div>
<div class="ui-field-contain">
<legend>Question 2:</legend>
<input type="radio" name="radio-choice-2" id="radio-choice-2-no" value="1">
<label for="radio-choice-2-no">No</label>
<input type="radio" name="radio-choice-2" id="radio-choice-2-yes" value="2">
<label for="radio-choice-2-yes">Yes</label>
</div>
</fieldset>
</div>
</div>
</div>