문제

When I add "multiple" attribute to select menu, it behaves differently & doesnt show all options in a drop down list.

How it looks:

enter image description here

Here's the html code:

<select name="advertLocation" multiple="multiple">
    <option value="--Select--">--Select--</option>
    <option style="color:#3366cb;" value="Public - No specific target"><b>Public - No specific target</b></option>
    <option>Afghanistan</option>
    <option>Albania</option>
    ......
</select>
도움이 되었습니까?

해결책

When adding multiple="multiple" and since you cannot select multiple values in a drop-down list, the browser renders the element as a scrolled list box.

There is nothing you can do to change this behaviour.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top