在选择中使用多个时,您可以选择它在textarea中显示的行数吗?
现在它在使用“multiple”时只显示4个Locations作为默认值,而这个select恰好是一个短列表。有没有办法显示像6或7或所有位置而不只是默认的4行?
<select name="Location" id="loc" multiple="multiple" required>
<!---<option selected value="">Select location</option>--->
<option value="OPERATIONS">Operations</option>
<option value="CCC">Contact Center</option>
<option value="QA">QA Department</option>
<option value="DS">DeSoto</option>
<option value="PS">Palma Sola</option>
<option value="LWR">Lakewood Ranch</option>
<option value="NR">North River</option>
<option value="SDL">SDL</option>
</select>
答案 0 :(得分:1)
只需使用size
属性:
<!-- This will show 10 items of the list -->
<select multiple size="10">
</select>
答案 1 :(得分:0)
答案 2 :(得分:0)
你可以改变身高。
#loc {
height:140px
}
&#13;
<select name="Location" id="loc" multiple="multiple" required>
<!---<option selected value="">Select location</option>--->
<option value="OPERATIONS">Operations</option>
<option value="CCC">Contact Center</option>
<option value="QA">QA Department</option>
<option value="DS">DeSoto</option>
<option value="PS">Palma Sola</option>
<option value="LWR">Lakewood Ranch</option>
<option value="NR">North River</option>
<option value="SDL">SDL</option>
</select>
&#13;
编辑:同样正如gavin所说,只使用size = k属性:
<select size="8" name="Location" id="loc" multiple="multiple" required>
<!---<option selected value="">Select location</option>--->
<option value="OPERATIONS">Operations</option>
<option value="CCC">Contact Center</option>
<option value="QA">QA Department</option>
<option value="DS">DeSoto</option>
<option value="PS">Palma Sola</option>
<option value="LWR">Lakewood Ranch</option>
<option value="NR">North River</option>
<option value="SDL">SDL</option>
</select>
&#13;