/*
https://github.com/sutara79/jquery.ajax-combobox
https://plugins.jquery.com/ajax-combobox/
https://sutara79-php.herokuapp.com/demo/jquery.ajax-combobox/
var items = [];
$.each( data, function( key, val ) {
items.push( "
" + data[0].CountyCode + "" );});
$( "
"class": "my-new-list",
html: items.join( "" )
}).appendTo( "body" );
*/
var data;
$.getJSON( "AjaxComboxHandler.ashx", function(data){
$('#foo').ajaxComboBox(
data,
{
lang: 'hk',
navi_num: 5, //显示几个数字页码
per_page: 15,//每页显示多少条
db_table: 'nation',
field: 'name',
sub_info: true,
show_field:'CountyCode,name,HkName,EnName,CnName,position,IdOrder',//提示可以显示的字段
sub_as: {
CountyCode: '國際區號:', //提示显示的列名
HkName:'繁体中文名:',
EnName: '英文名:',
CnName:'简体中文名:',
position: '所在洲:',
IdOrder:'排序:',//字符串排序
},
select_only: true,
init_record: '00',
primary_key: 'CountyCode',
order_by: [
'IdOrder ASC', // ASC or DESC
'CountyCode'
]
}
);
});
國家: