Jquery mobile 如何使用jquery mobile在复选框标签旁边添加文本框?

Jquery mobile 如何使用jquery mobile在复选框标签旁边添加文本框?,jquery-mobile,checkbox,textbox,label,Jquery Mobile,Checkbox,Textbox,Label,如何使用jquery mobile在复选框标签旁边添加文本框?如果要将标签添加到与其引用元素相同的行中,则它应位于一行(复选框-->标签(用于复选框-->文本框),例如: <div data-role="fieldcontain"> <fieldset data-role="controlgroup"> <legend>Agree to the terms:</legend> <input type="

如何使用jquery mobile在复选框标签旁边添加文本框?如果要将标签添加到与其引用元素相同的行中,则它应位于一行(复选框-->标签(用于复选框-->文本框)

,例如:

<div data-role="fieldcontain">
    <fieldset data-role="controlgroup">
        <legend>Agree to the terms:</legend>
        <input type="checkbox" name="checkbox-2" id="checkbox-2" class="custom" />
        <label for="checkbox-2">I agree</label>
    </fieldset>
</div>
我的图例[]复选框标签

您可能希望尝试使用带有
data role=“fieldcontain”
的字段容器

例如:

<div data-role="fieldcontain">
    <fieldset data-role="controlgroup">
        <legend>Agree to the terms:</legend>
        <input type="checkbox" name="checkbox-2" id="checkbox-2" class="custom" />
        <label for="checkbox-2">I agree</label>
    </fieldset>
</div>
希望这有帮助