從Satya'scomment
實際上,有一個jQuery plugin做這個,一個漂亮的一套配置選項:
$(document).ready(function() {
$("select").searchable({
maxListSize: 100, // if list size are less than maxListSize, show them all
maxMultiMatch: 50, // how many matching entries should be displayed
exactMatch: false, // Exact matching on search
wildcards: true, // Support for wildcard characters (*, ?)
ignoreCase: true, // Ignore case sensitivity
latency: 200, // how many millis to wait until starting search
warnMultiMatch: 'top {0} matches ...', // string to append to a list of entries cut short by maxMultiMatch
warnNoMatch: 'no matches ...', // string to show in the list when no entries match
zIndex: 'auto' // zIndex for elements generated by this plugin
});
});
這裏是一個example
嘗試尋找這裏http://www.jque.re/plugins/forms-controls/searchabledropdown/ – Satya
嗨!請一看就知道http://stackoverflow.com/help/on-topic。 – Epodax
@Satya - 非常感謝你!那實際上正是我所期待的。一直在尋找結果的小時。謝謝! - Epodax - 我看到我可能需要一些關於該主題的更多信息。我會在下次看到它。感謝您指出 –