-6

I have a box in which i have displayed a list of cities, i want it to make selectable so that user can select multiple cities.thanks in advance

my code is:

'<div class="box" style="display: inline-block;margin-left: -330px;">
<ul multiple="multiple" style="list-style-type: none;">
<li>mumbai</li>
<li>bangalore</li>
<li>hyderabad</li>
<li>chennai
</li>
</ul>'
4

1 回答 1

0

如果您希望它们可选择,您想使用表单项而不是列表;像这样:

<div class="box" style="display: inline-block;margin-left: -330px;">
<select multiple="multiple">
<option value="0">mumbai</option>
<option value="1">bangalore</option>
<option value="2">hyderabad</option>
<option value="3">chennai</option>
</select>

HTH;

于 2013-07-31T06:11:47.997 回答