jQuery 1.9 Autocomplete 点击提示全部

<inputid="autocomplete"/>&nbsp;<inputid="submit"type="submit"/>

var source = ['One', 'Two', 'Three', 'Four'];

var firstVal = source[0];

$("input#autocomplete").autocomplete({
    minLength: 0,
    source: source
}).focus(function() {
    $(this).autocomplete("search", "");
});
posted @ 2013-05-08 20:36  javawebsoa  Views(205)  Comments(0)    收藏  举报