Is there a way to use Autocomplete without JQuery UI

前端 未结 4 1215
北海茫月
北海茫月 2021-01-14 05:37

Is there a way to use autocomplete without JQuery UI cause JQuery UI\'s footprint is too large (including its CSS) ?

or is there any alternative plugin or something

4条回答
  •  南笙
    南笙 (楼主)
    2021-01-14 05:39

    No need to include JQuery or any other third party library.

    IP_autoComplete function will automatically concatinate field value to URL (1st parameter). For example textbox has value neeraj then arrjson.php?Name=neeraj will be triggered.

    You can use IP_autocomplete function for static value as well. Just add # sign once at starting in your string (comma sepreated). E.g: "#val1,val2,val3"

    arrjson.php should return json encoded string.

    HTML:

    
    
                                     
                  
提交回复
热议问题