介绍一个自动完成的js类库autocomplete

下载地址:http://createwebapp.com/

new Autocomplete(”consumerName”, function() {
return “consumers.php?q=” + this.value;
}); 文档地址:http://createwebapp.com/autocomplete
文档非常详细。
 需要注意的一点是

<script>
    new Autocomplete(”consumerName”, function() {
       
        return “consumers.php?q=” + this.value;
    });
</script>
这段js要写在

<form>
    <input type=”hidden” name=”consumerID” id=”consumerID”/>
    <input type=”text” name=”consumerName”/>
</form>

之后。
截图如下:
autocomplete.jpg

Posted in other. Tags: . 没有评论 »