typeahead

typeahead

typeahead使用ajax补全输入框

bootstrap2.xlopo1983 发表了文章 • 0 个评论 • 2140 次浏览 • 2016-02-01 09:53 • 来自相关话题

$('.typeahead').typeahead({
source:function(query, process)
{
$.ajax({
url: site_url + 'product/get_pdt_name',
type: 'GET',
dataType: 'JSON',
async: true,
data: 'pdt_name=' + query ,
success: function(data)
{
var arr = [];
for (i in data)
{
arr.push(data[i]['pdt_name']);
}
process(arr);
}
});
}
}) 查看全部
$('.typeahead').typeahead({
source:function(query, process)
{
$.ajax({
url: site_url + 'product/get_pdt_name',
type: 'GET',
dataType: 'JSON',
async: true,
data: 'pdt_name=' + query ,
success: function(data)
{
var arr = [];
for (i in data)
{
arr.push(data[i]['pdt_name']);
}
process(arr);
}
});
}
})

typeahead使用ajax补全输入框

bootstrap2.xlopo1983 发表了文章 • 0 个评论 • 2140 次浏览 • 2016-02-01 09:53 • 来自相关话题

$('.typeahead').typeahead({
source:function(query, process)
{
$.ajax({
url: site_url + 'product/get_pdt_name',
type: 'GET',
dataType: 'JSON',
async: true,
data: 'pdt_name=' + query ,
success: function(data)
{
var arr = [];
for (i in data)
{
arr.push(data[i]['pdt_name']);
}
process(arr);
}
});
}
}) 查看全部
$('.typeahead').typeahead({
source:function(query, process)
{
$.ajax({
url: site_url + 'product/get_pdt_name',
type: 'GET',
dataType: 'JSON',
async: true,
data: 'pdt_name=' + query ,
success: function(data)
{
var arr = [];
for (i in data)
{
arr.push(data[i]['pdt_name']);
}
process(arr);
}
});
}
})

typeahead使用ajax补全输入框

bootstrap2.xlopo1983 发表了文章 • 0 个评论 • 2140 次浏览 • 2016-02-01 09:53 • 来自相关话题

$('.typeahead').typeahead({
source:function(query, process)
{
$.ajax({
url: site_url + 'product/get_pdt_name',
type: 'GET',
dataType: 'JSON',
async: true,
data: 'pdt_name=' + query ,
success: function(data)
{
var arr = [];
for (i in data)
{
arr.push(data[i]['pdt_name']);
}
process(arr);
}
});
}
}) 查看全部
$('.typeahead').typeahead({
source:function(query, process)
{
$.ajax({
url: site_url + 'product/get_pdt_name',
type: 'GET',
dataType: 'JSON',
async: true,
data: 'pdt_name=' + query ,
success: function(data)
{
var arr = [];
for (i in data)
{
arr.push(data[i]['pdt_name']);
}
process(arr);
}
});
}
})