推荐答案要更改预输入输入值,请使用以下构造:To change typeahead input value, use the following construction:$(input).typeahead('val',value);因此,在您的情况下,它应类似于:So, in your case it should looks like:$("#typeahead_object").typeahead('val',"test");在 https://github.com/twitter上可以找到 typeahead API文档. /typeahead.js/blob/master/doc/jquery_typeahead.md#datasets 这篇关于Bootstrap typeahead-如何手动设置默认值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
10-24 13:27