Json 引导程序自动完成插件的问题
使用此插件: 我正在尝试加载json文件,但遇到了一些问题。 如果我尝试这样的构造:Json 引导程序自动完成插件的问题,json,twitter-bootstrap,plugins,autocomplete,Json,Twitter Bootstrap,Plugins,Autocomplete,使用此插件: 我正在尝试加载json文件,但遇到了一些问题。 如果我尝试这样的构造: $('#').magicSuggest({ data: 'cities.json', ajaxConfig: { xhrFields: { withCredentials: true } } }); 获取一个错误: POST http://...../cities.json 405 (Method Not Allowed) Uncaught Could n
$('#').magicSuggest({
data: 'cities.json',
ajaxConfig: {
xhrFields: {
withCredentials: true
}
}
});
获取一个错误:
POST http://...../cities.json 405 (Method Not Allowed)
Uncaught Could not reach server
当我改变时:
ajaxConfig: { method: 'GET' }
并尝试在输入字段中输入一些字母,但出现以下错误:
Uncaught TypeError: Cannot read property 'toLowerCase' of undefined
我怎样才能解决这个问题