我收到了错误:
Object doesn't support property or method 'undefined'
在javascript文件bootstrap-tagsinput.js
中。
var retVal = tagsinput[arg1](arg2);
arg1
和arg2
未定义
使用以下代码:
<input type="text" value="Amsterdam,Washington" data-role="tagsinput" id="article_tags"/>
<script src="../../Scripts/js/bootstrap.min.js" type="text/javascript"></script>
<script src="../../Scripts/js/bootstrap-tagsinput.js" type="text/javascript"></script>
<script src="../../Scripts/js/typeahead.js" type="text/javascript"></script>
$(function () {
$('input').tagsinput();
// Adding custom typeahead support using http://twitter.github.io/typeahead.js
$('input').tagsinput('input').typeahead({
prefetch: '../../Content/json/data.json'
}).bind('typeahead:selected', $.proxy(function (obj, datum) {
this.tagsinput('add', datum.value);
this.tagsinput('input').typeahead('setQuery', '');
}, $('input')));
});