2013-12-20 39 views
0
<script type="text/javascript"> 
    //Create a new variable j$ just to avoid any conflicts with other libraries which may be using $. 
    var j$ = jQuery.noConflict(); 
    //Capture the list of countries in a Array. 
    var countryArray = {!jsonDescriptionData}; 
    //on Document ready 
    j$(document).ready(function(){ 
     j$("#countryautocomplete").autocomplete({ 
      source:countryArray    
    }); 
    });   
</script> 

目前正在採取這種方式。如果我鍵入「a」,它顯示的名稱中包含a.but但我需要以這種方式顯示名稱以a開頭如果我鍵入ab。it必須僅顯示以ab開頭的名稱如何編寫字母自動完成搜索?

回答