我只想在代码中的任何地方获得typeahead控件的"minLength“参数。
我该怎么做呢?
控件的定义如下:
$('#typeahead').typeahead({
hint: true,
highlight: true,
minLength: 3
},
....发布于 2014-11-29 19:05:31
你可以试试这个
var options = {
hint: true,
highlight: true,
minLength: 3
}
$('#typeahead').typeahead(options)
// and to get the minLength just use options.minLength
console.log(options.minLength);https://stackoverflow.com/questions/27201417
复制相似问题