Getting jQuery autocomplete to work with PHP source

前端 未结 2 937
慢半拍i
慢半拍i 2020-12-21 11:00

I have a jQuery autocomplete field with this code:

 var tags = [\"a\", \"ab\", \"abc\", \"abcd\", \"adbce\", \"abcdef\", \"abcdefg\", \"abcdefgh\", \"abcdefg         


        
2条回答
  •  醉话见心
    2020-12-21 11:29

    $.ajax({
         url:"http://absolutepathtofile/autosuggest.php",
         type:"post",
         success:function(html){
             $("#user_phone").autocomplete(
                {position: {offset: "0 -10px"},
                source: html
             });
         }   
    });
    
    • work greate for me and tested

提交回复
热议问题