DROPDOWNLIST - 数字显示单元 [英] Dropdownlist - number of display element

查看:127
本文介绍了DROPDOWNLIST - 数字显示单元的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的网页DropDownList的。

I have dropdownlist on my webpage.

当我点击它的所有项目的列表展开。但这个名单很长。

When I click it the list with all items is expanded. But this list is very long.

我怎样才能改变它achievie用(例如)5显示的项目,并与旁边有一个滚动条的列表。

How can I change it to achievie a list with (e.g.) 5 displayed items and with a scrollbar next to them.

如果这是不可能的,我怎么可以用列表框呢?我知道这是行物业有,但我可以声明多少行是显示所有没有时间展开列表后。

If it is not possible, how can I do it with ListBox? I know it is Rows property there but can I declare how many rows is display all the time not after expanding the list.

推荐答案

这个控制,当然会在页面上呈现为标准<选择> 控制

This control, will, of course be rendered on the page as a standard <select> control.

有了这些,一旦其掉下来是由浏览器决定,你必须在这个没有控制列表的高度。你会注意到在列表接近页面的脚下时,浏览器将实行滚动条如你所说,却不能与你也许要项目数。

With these, the height of the list once its dropped down is determined by the browser, and you have no control over this. You'll notice when the list approaches the foot of the page, the browser will implement the scrollbar as you suggested, but not with the number of items you maybe want.

我唯一的建议是,调查一些客户端下拉插件提供的选项。你也许能找到一些jQuery的人,这将有助于。

My only suggestion would be to investigate the options offered by some client-side drop down add-ins. You may be able to find some jQuery ones that will help.

一个简单的谷歌搜索jQuery的下拉菜单取得了这篇文章作为顶级的结果:的 38 jQuery和CSS下拉多层次菜单解决方案的。如果你不能在这里找到的东西,然后也有在搜索结果中很多类似的网站。

A simple google search for "jquery dropdowns" yielded this article as the top result: 38 jQuery And CSS Drop Down Multi Level Menu Solutions. If you can't find something here then there are also plenty similar sites in the search results.

这篇关于DROPDOWNLIST - 数字显示单元的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆