简体   繁体   English

jQuery插件将IE 6的键盘支持替换为HTML select

[英]jQuery Plugin to replace HTML select with keyboard support for IE6

I'm looking for a jQuery plugin that either replaces or improves the HTML <select> tag in Internet Explorer 6. 我正在寻找可替代或改进Internet Explorer 6中HTML <select>标记的jQuery插件。

Think of this situation: 考虑这种情况:

<select name="test">
    <option>Apple</option>
    <option>Apricot</option>
    <option>Lemon</option>
    <option>Peach</option>
    <option>Pear</option>
    <option>Raspberry</option>
</select>

When in IE7 or later (or Firefox) you select the resulting select box and type "APR" you will select "Apricot", because it starts with APR. 在IE7或更高版本(或Firefox)中,您选择出现的选择框并键入“ APR”,您将选择“ Apricot”,因为它以APR开头。

In IE6 you end up at Raspberry, because at "A" it selects "Apple", then "P" -> "Peach" and finally R -> "Raspberry". 在IE6中,您最终会进入Raspberry,因为在“ A”处选择“ Apple”,然后选择“ P”->“桃子”,最后选择R->“ Raspberry”。

Now what my client is looking for is IE7 behaviour in IE6. 现在,我的客户正在寻找的是IE6中的IE7行为。 Any chance that there is a plugin for jQuery that can save me from writing my own implementation of a select box? 有没有一个jQuery插件可以使我免于编写自己的选择框实现的机会?

I have found several, but they either lack sensible keyboard support altogether or they don't work with IE6. 我发现了几种,但它们要么完全缺乏合理的键盘支持,要么不能与IE6一起使用。

(And: No, Updating to IE7 is not yet an option.) (而且:不,还不能更新到IE7。)

Why not eliminate the select box and implement an auto complete box? 为什么不消除选择框并实现自动完成框呢? There are plenty of plugins for jQuery that handle auto complete. 有很多用于自动完成的jQuery插件。 You could even store the values in the JavaScript the eliminate the need to go back to the server as the user types. 您甚至可以将值存储在JavaScript中,从而无需在用户键入时返回服务器。

我将研究类似FlexBox的东西,这可能对您要完成的工作有效。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM