如何使 AutoCompleteExtender 在 IE6 中的选择控件上方呈现
当 AutoCompleteExtender
在 IE6 中显示时,它似乎会忽略 z-index 并在 IE6 中的任何选择控件(如 dropdownlists)下方呈现。
<asp:TextBox ID="TextBox1" runat="server" />
<cc1:AutoCompleteExtender ID="AutoCompleteExtender1" runat="server"
TargetControlID="TextBox1" EnableCaching="true" CompletionSetCount="5"
FirstRowSelected="true" ServicePath="~/Services/Service1.asmx" ServiceMethod="GetSuggestion" />
<asp:DropDownList ID="DropDownList1" runat="server">
<asp:ListItem Text="Item 1" Value="0" />
<asp:ListItem Text="Item 2" Value="1" />
</asp:DropDownList>
如何使其呈现在下拉列表上方?
When an AutoCompleteExtender
is displayed in IE6 it seems to ignore z-index and renders below any select controls (like dropdownlists) in IE6.
<asp:TextBox ID="TextBox1" runat="server" />
<cc1:AutoCompleteExtender ID="AutoCompleteExtender1" runat="server"
TargetControlID="TextBox1" EnableCaching="true" CompletionSetCount="5"
FirstRowSelected="true" ServicePath="~/Services/Service1.asmx" ServiceMethod="GetSuggestion" />
<asp:DropDownList ID="DropDownList1" runat="server">
<asp:ListItem Text="Item 1" Value="0" />
<asp:ListItem Text="Item 2" Value="1" />
</asp:DropDownList>
How do I make it render above dropdownlists?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
@Orion 这个部分正确 - 还有另一种方法来处理这些问题,那就是用 iframe 覆盖有问题的选择列表。 此技术用于 Cody Lindley 的 ThickBox(为 jQuery 编写)。 有关如何执行此操作的详细信息,请参阅代码。
@Orion has this partially correct - there is one other way to deal with these, and that is to cover the offending select lists with an iframe. This technique is used in Cody Lindley's ThickBox (written for jQuery). See the code for details on how to do it.
IE6 中的选择控件下方不呈现任何内容。 这是微软向世界赠送 IE 时赋予我们的众多“功能”之一。
您必须隐藏它们,然后重新显示它们。
观察标准灯箱script - 正是这样做的
(请注意,该链接只是我在谷歌上找到的第一个东西,它有 lightbox.js 的源代码作为演示。它与其他任何东西都没有关系)
Nothing renders below select controls in IE6. It's one of the many "features" microsoft bestowed upon us when they gifted IE to the world
You have to hide them, then re-show them.
Observe the standard lightbox script - which does exactly this
(note that link is just to the first thing I found on google which had the source to lightbox.js as a demonstration. It's got nothing to do with anything else)