开发者

Drop down list that doesnt show the first element?

How can I create a drop down list that doesn't show when You expand the drop down list? (because the first element has text "Please make selection" and no 开发者_开发百科value. Plus, it looks bad with the please select in the list right under the same text.


You can either create an option group (example here) so that it's not selectable, or just leave the first option blank and add your own validation for the dropdown. A blank one would just be:

<option value="-1"></option>


It isn't possible immediately from the server-side. You'll have to include a special option, and add some CSS and javascript. See this question for a solution (and check out the JsFiddle he added).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜