垂直滚动禁用< select> mutliple元素在IE中不起作用 [英] vertical scrolling of disabled <select> mutliple element not working in IE

查看:63
本文介绍了垂直滚动禁用< select> mutliple元素在IE中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个禁用滚动条的select多元素。在Windows上的Chrome和Firefox中,它仍然可滚动,但无法进行选择。但是在IE中它不可滚动,所以并不是所有选项都可以看到。

I have a select multiple element with scrollbars that is disabled. In Chrome and Firefox on Windows it is still scrollable but no selections can be made. However in IE its not scrollable, so not all options can be seen.

有没有办法迫使IE以同样的方式表现得像Chrome / FF?这基本上是多选选项列表的只读表示,他们可以看到哪些元素被选中。

Is there any way to force IE to behave like Chrome/FF in the same way? This is basically a read-only presentation of the multi-select picklist where they can see which elements where selected.

这是一些示例代码和小提琴( http://jsfiddle.net/2ET44/2/

Here's some example code and a fiddle (http://jsfiddle.net/2ET44/2/:

<select multiple size="5" style="max-height:50px" disabled>
    <option>value number 1</option>
    <option>val 2</option>
    <option>val 3</option>
    <option>val 4</option>
    <option>val 5</option>
    <option>value 6</option>
    <option>val 7</option>
    <option>val 8</option>
    <option>val 9</option>
    <option>val 10</option>
</select>

谢谢!

推荐答案

尝试禁用选项而不是选择

Try disabling options rather than select

 <select size="5" style="height:100px" >
 <option disabled>value 1</option>
 <option disabled>value 2</option>
 <option disabled>value 3</option>
 <option disabled>value 4</option>
 <option disabled>value 5</option>
 <option disabled>value 6</option>
 <option disabled>value 7</option>
 <option disabled>value 8</option>
 </select>

这篇关于垂直滚动禁用&lt; select&gt; mutliple元素在IE中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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