0

我在使用平板电脑(带键盘底座)上的箭头键选择单选按钮时遇到问题。对于普通按钮,选择有效,但不适用于单选按钮。

<body>      
    <div data-role="page" data-theme="a">
        <div id="type_selection" data-role="controlgroup" data-type="horizontal">
            <input type="radio" id="radio_option1" name="radio" checked="checked" /><label for="radio_option1">Option 1</label>
            <input type="radio" id="radio_option2" name="radio" /><label for="radio_option2">Option 2</label>
            <input type="radio" id="radio_option3" name="radio" /><label for="radio_option3">Option 3</label>
            <input type="radio" id="radio_option4" name="radio" /><label for="radio_option4">Option 4</label>
        </div>
    </div>  
</body>

用键盘选择常规按钮不是问题:

<button id="btn_dothat" data-inline="true">That</button>

无论如何要解决这个问题还是这是 jQuery Mobile 的限制?

4

1 回答 1

0

用于checkboxradio("refresh")更新单选按钮

更新:

而不是使用divfor control group,使用fieldset

<fieldset id="type_selection" data-role="controlgroup" data-type="horizontal">
    <input type="radio" id="radio_option1" name="radio" checked="checked" />
    <label for="radio_option1">Option 1</label>
    <input type="radio" id="radio_option2" name="radio" />
    <label for="radio_option2">Option 2</label>
    <input type="radio" id="radio_option3" name="radio" />
    <label for="radio_option3">Option 3</label>
    <input type="radio" id="radio_option4" name="radio" />
    <label for="radio_option4">Option 4</label>
</fieldset>
于 2012-08-15T10:40:06.787 回答