自动完成功能无效? [英] Autocomplete is not working why?
本文介绍了自动完成功能无效?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试从数组值执行自动完成但是值不显示原因?
I am trying to do autocomplete from array value but the value dont display why?
<link rel="stylesheet" href="http://code.jquery.com/ui/1.11.2/themes/smoothness/jquery-ui.css"/>
<script src="http://code.jquery.com/jquery-1.10.2.js"></script>
<script src="http://code.jquery.com/ui/1.11.2/jquery-ui.js"></script>
$(function () {
var availableTags = [
"ActionScript",
"AppleScript",
"Asp",
"BASIC",
"C",
"C++",
];
$(searchInput).autocomplete({
source: availableTags
});
});
在我的default.aspx我有这个代码
in my default.aspx i have this code
<div class="ui-widget">
<input id="searchInput"/>
</div>
推荐答案
(function(){
var availableTags = [
ActionScript,
< span class =code-string> AppleScript,
Asp,
BASIC,
C,
C ++,
];
(function () { var availableTags = [ "ActionScript", "AppleScript", "Asp", "BASIC", "C", "C++", ];
(searchInput).autocomplete({
source:availableTags
});
});
(searchInput).autocomplete({ source: availableTags }); });
在我的default.aspx我有这个代码
in my default.aspx i have this code
<div class="ui-widget">
<input id="searchInput"/>
</div>
我可以立即看到的第一个错误:
First bug I can see immediately:
这篇关于自动完成功能无效?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文