最近遇到一个很纠结的问题:jquery.autocomplete在IE6下被下拉框遮挡 。

最近遇到一个很纠结的问题:jquery.autocomplete在IE6下被下拉框遮挡 。

 

如图:

 

 

网上找到原因,例如:http://www.360doc.com/content/10/1126/16/2197500_72641076.shtml

 

但是,我们的问题是我们用了jquery.autocomplete这个控件,这些方法对于我们就不行了。

 

废话多了,直接解决方法:

 

第一步:打开jquery.autocomplete.min.js(或者直接jquery.autocomplete.js),找到“function init()”,把这个函数下的“element=$("<div/>")”修改为“element=$("<div><iframe style='position: absolute; z-index: -1; width: 100%; height: 100%; top: 0;left: 0; scrolling: no;' frameborder='0' src='about:blank'></iframe></div>")”。

 

第二步:打开“jquery.autocomplete.css”,在“.ac_results”加一句“height:335px;”,就是设置高度,这个随便你设置。

 

刷新,如下图:

 

 

 

至此,问题解决。

posted @ 2014-08-19 17:48  哼哼c#  阅读(139)  评论(0编辑  收藏  举报