我需要在表单上创建一个“建议的结果”字段,并且我可以使用一个不错的 jQuery 脚本来运行它:
<head>
<link rel="stylesheet"href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css"/>
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
<script src="ajax.js"language="javascript"type="text/javascript"></script>
<script>
$(function() {
var availableTags = [
"Abel Law Offices",
"Abigail Rivamonte, Attorney at Law",
"Abrams & Heyn"
];
$( "#tags").autocomplete({
source: availableTags
});
});
</script>
</head>
<body>
<input type="text" id="tags" name="tags" >
</body>
</html>
我的问题是:谁能告诉我如何修改它,以便在表单字段中有一个值。
喜欢:
<input type="text" id="tags" name="tags" value="WHAT IS CHOSEN FROM RESULTS">
谢谢!