Jquery自动完成滚动条未出现在IE中
我正在使用最新版本的jQuery自动完成插件,并填充了一个大约800个条目的数组(作为自动完成的输入)。现在奇怪的是,当我键入一个触发大结果的字母(导致一个滚动条)时,我可以在Firefox中看到一个滚动条,但在Internet Explorer中看不到 我只在JSP中包含了文件Jquery自动完成滚动条未出现在IE中,jquery,internet-explorer,autocomplete,scrollbar,Jquery,Internet Explorer,Autocomplete,Scrollbar,我正在使用最新版本的jQuery自动完成插件,并填充了一个大约800个条目的数组(作为自动完成的输入)。现在奇怪的是,当我键入一个触发大结果的字母(导致一个滚动条)时,我可以在Firefox中看到一个滚动条,但在Internet Explorer中看不到 我只在JSP中包含了文件jquery.autocomplete.css和jquery.autocomplete.js。我还需要包括什么吗 编辑:我的CSS如下: .ac_results { padding: 0px; borde
jquery.autocomplete.css
和jquery.autocomplete.js
。我还需要包括什么吗
编辑:我的CSS如下:
.ac_results {
padding: 0px;
border: 1px solid black;
background-color: white;
overflow: hidden;
z-index: 99999;
}
.ac_results ul {
width: 100%;
list-style-position: outside;
list-style: none;
padding: 0;
margin: 0;
}
.ac_results li {
margin: 0px;
padding: 2px 5px;
cursor: default;
display: block;
/*
if width will be 100% horizontal scrollbar will apear
when scroll mode will be used
*/
/*width: 100%;*/
font: menu;
font-size: 12px;
/*
it is very important, if line-height not setted or setted
in relative units scroll will be broken in firefox
*/
line-height: 16px;
overflow: hidden;
}
更改dtd为我解决了问题: 有关更多信息,请参见此:
/Olle在jquery.autocomplete.js中添加document.body.style.maxHeight的额外检查为我解决了这个问题:
if($.browser.msie &&
((typeof document.body.style.maxHeight === "undefined") ||
(document.body.style.maxHeight == '')))
它在735行附近它进入了哪个版本的IE?您的页面上是否有其他冲突的CSS?这似乎在IE8中工作得很好:谢谢,我也在使用IE8,没有任何协同css。我只包含了这两个指定的文件,不知道可能出了什么问题!在mozilla中工作,也不在eclipse内部浏览器中工作如果您可以给我们一个链接,指向有问题的页面(或重新创建),我们可能会提供帮助。既然我不能重复这个问题,我唯一能给你的建议就是使用IE开发者工具栏来了解CSS的情况。您可能还想尝试取消注释
width:100%代码>jquery.autocomplete.css中的行。顺便说一下,如果您设置了正确的doctype(以便IE不会进入怪癖模式),则不会出现问题: