单行中的jquery移动输入字段

时间:2013-10-25 20:30:14

标签: jquery-mobile

如何在单个水平线上对齐Jquery输入字段?

 <div data-role="fieldcontain">
        <fieldset data-role="controlgroup" data-type="horizontal">
            <legend>Term:</legend>
            <label for="txtSDate">
            </label>
            <input id="txtSDate" name="txtSDate" value="<%=sdate%>" placeholder="Enter start date" type="date"  data-inline="true"
                maxlength="12" />
            <label for="txtEDate">
            </label>
            <input id="txtEDate" name="txtEDate" value="<%=edate%>" type="date" maxlength="12" placeholder="Enter end date" />
        </fieldset>
    </div>

1 个答案:

答案 0 :(得分:0)

也许你错过了fieldcontian? 请尝试以下:

<div data-role="fieldcontain">
   <label for="txtSDate"></label>
   <input id="txtSDate" name="txtSDate" value="<%=sdate%>" placeholder="Enter start date"  type="date"  data-inline="true" maxlength="12" />
</div>