我正在使用 Google Apps Script HtmlService 和 jquery 处理一个相当复杂的表单。我正在尝试使用 jquery 的自动完成功能,它的工作原理有所不同。如果我开始输入“ja”,然后使用向下箭头键,它将滚动浏览结果。然而,它应该做的是像在本地一样动态地在列表中显示它们。控制台中有错误,但不知道该怎么做:
错误 4089105213-maestro_htmlapp_bin_maestro_htmlapp.js:55 pl 4089105213-maestro_htmlapp_bin_maestro_htmlapp.js:55
<!DOCTYPE html>
<html>
<head>
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
<script src="http://code.jquery.com/jquery-1.8.2.js"></script>
<script src="http://code.jquery.com/ui/1.8.23/jquery-ui.js"></script>
<script>
$(function() {
var availableTags = [
"ActionScript",
"AppleScript",
"Asp",
"BASIC",
"C",
"C++",
"Clojure",
"COBOL",
"ColdFusion",
"Erlang",
"Fortran",
"Groovy",
"Haskell",
"Java",
"JavaScript",
"Lisp",
"Perl",
"PHP",
"Python",
"Ruby",
"Scala",
"Scheme"
];
$( "#tags" ).autocomplete({
source: availableTags
});
});
</script>
</head>
<body>
<div class="demo">
<div class="ui-widget">
<label for="tags">Tags: </label>
<input id="tags" />
</div>
</div><!-- End demo -->
</body>
</html>