js代码
<script src="dist/autocomplete.js"></script> <script> var proposals = ['at', 'boat', 'bear', 'chief', 'dog', 'drink', 'elephant', 'fruit', 'grave','hotel', 'illness', 'London', 'motorbike','站长素材','站长之家','站长下载']; $(document).ready(function(){ $('#search-form').autocomplete({ hints: proposals, width: 300, height: 30, onSubmit: function(text){ $('#message').html('Selected: <b>' + text + '</b>'); } }); }); </script>