disabled textarea can not scroll in IE8 - workaround?

强颜欢笑 提交于 2019-12-23 12:23:08

问题


Under IE8, a disabled textarea won't scroll.

For example:

<textarea style="width: 85%; overflow-y: scroll;" rows="2" name="blog[comment]" id="blog_comment" disabled="disabled" cols="30">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere, erat eu ornare eleifend, sapien eros faucibus metus, nec dapibus erat ante sed lorem. Cras tempus maximus eros, ut hendrerit est. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.</textarea>

It works fine in FireFox, but in IE8, the user can't scroll it, so the user can't see the full comment.

It also works with readonly, but I want to use disabled.

Is there a fix or workaround?

来源:https://stackoverflow.com/questions/10877988/disabled-textarea-can-not-scroll-in-ie8-workaround

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!