Javascript 未能加载firebase(重定向错误)
我正在尝试学习ajax,但我还不懂后端语言,所以我使用google的firebase,并使用python 2.7通过localhost:8000运行代码。我正在尝试获取/发布到此服务器: 如果您无法访问它,我的JSON如下所示:Javascript 未能加载firebase(重定向错误),javascript,jquery,ajax,firebase,firebase-realtime-database,Javascript,Jquery,Ajax,Firebase,Firebase Realtime Database,我正在尝试学习ajax,但我还不懂后端语言,所以我使用google的firebase,并使用python 2.7通过localhost:8000运行代码。我正在尝试获取/发布到此服务器: 如果您无法访问它,我的JSON如下所示: [ { "id": 1, "name" : "Will", "drink": "American with creme" }, { "id": 2, "name":
[
{
"id": 1,
"name" : "Will",
"drink": "American with creme"
},
{
"id": 2,
"name": "Donat",
"drink": "Vanilla Macchiato"
}
]
这是我的HTML和javascript
$(函数(){
$.ajax({
键入:“GET”,
网址:'https://ajax-practice-1f1b9.firebaseio.com',
成功:功能(数据){
控制台日志(数据);
}
});
});代码>
AJAX jQuery课程
jqueryajax教程
咖啡订单
姓名:
饮料:
添加
URLhttps://ajax-practice-1f1b9.firebaseio.com
将尝试在中加载数据库。您可能试图通过Firebase的RESTAPI获取数据,该API要求URL以.json
结尾
因此,要获取该位置的JSON,请使用https://ajax-practice-1f1b9.firebaseio.com/.json
正是我想要的!!非常感谢你!