我有一个下拉列表,里面有一些选项。
<div class="control-group pull-left">
<label class=" help-inline"> Notify staff
<input type="text" class="span1 min" name="someName"/>
<select id="duration-unit-outingMinCutoff" name="duration-unit-outingMinCutoff" class="span2">
<option value="minutes" selected="selected">minutes</option>
<option value="hours" selected="selected">hour(s)</option>
<option value="days" selected="selected">day(s)</option>
</select>
prior to start time
</label>
</div>
当我点击下拉列表时,它会在IE上突然打开并关闭。在IE中打开this,您可以看到我正在谈论的问题。
答案 0 :(得分:2)
您使用<label>
是个问题。输入不应该进入标签内部。 Fiddle。
<div class="control-group pull-left">
<label class=" help-inline"> Notify staff</label>
<input type="text" class="span1 min" name="group.outingMinCutoff" />
<select id="duration-unit-outingMinCutoff" name="duration-unit-outingMinCutoff" class="span2">
<option value="minutes">
minutes
</option>
<option value="hours">
hour(s)
</option>
<option value="days">
day(s)
</option>
</select>
<label> prior to start time</label>
</div>