如何在单个页面上使用多个jQuery AutoSuggest?

如何在单个页面上使用多个jQuery AutoSuggest?,jquery,autocomplete,autosuggest,Jquery,Autocomplete,Autosuggest,谢谢你的回复。所以我没有就我的问题添加更多的细节。现在我来解释整个问题 我在我的页面中创建了一个Autosuggest,现在我希望在同一页面中再创建两个Autosuggest,这意味着一个页面中总共有三个Autosuggest 我使用这个语法在我的页面中创建autosuggest $("input[type=text]").autoSuggest("http://mysite.com/path/to/script", {minChars: 2, matchCase: true}); 但是,如果

谢谢你的回复。所以我没有就我的问题添加更多的细节。现在我来解释整个问题

我在我的页面中创建了一个Autosuggest,现在我希望在同一页面中再创建两个Autosuggest,这意味着一个页面中总共有三个Autosuggest

我使用这个语法在我的页面中创建autosuggest

$("input[type=text]").autoSuggest("http://mysite.com/path/to/script", {minChars: 2, matchCase: true});
但是,如果我在一个页面中再放置两个autosuggest,那么我只会得到第一个autosuggest值。意思是我不知道在jquery中放什么,在HTML中放什么

你能给我举个简单的例子在一个页面上创建三个autosuggest吗

事先非常感谢。


<input type="text" id="first" />
<input type="text" id="second" />
<input type="text" id="third" />


$("#first").autoSuggest("http://mysite.com/path/to/script/first", {minChars: 2, matchCase: true});

$("#second").autoSuggest("http://mysite.com/path/to/script/second", {minChars: 2, matchCase: true});

$("#third").autoSuggest("http://mysite.com/path/to/script/third", {minChars: 2, matchCase: true});
$(“#第一”).autoSuggest(”http://mysite.com/path/to/script/first“,{minChars:2,matchCase:true}); 美元(“#秒”)。自动建议(“http://mysite.com/path/to/script/second“,{minChars:2,matchCase:true}); 美元(“#第三”)。自动建议(”http://mysite.com/path/to/script/third“,{minChars:2,matchCase:true});
ya感谢您的回复,但如何检索自动建议值。。。?