我正在尝试学习Firebase。但我无法将我的输入保存到Firebase数据库,因为即使添加了我所知的所有必需脚本,它仍未初始化。以下是我的全部代码 PS:为了学习目的,我的数据库认证也被关闭。所以它不能有任何认证问题。无法初始化我的html文件中的firebase并将任何数据保存到实时数据库

Learning Firebase

var config = {

apiKey: "xxxxxxxx",

authDomain: "xxxxxxxx",

databaseURL: "xxxxxxx",

projectId: "xxxxxx",

storageBucket: "xxxxxxx",

messagingSenderId: "xxxxxxx"

};

firebase.initializeApp(config);

var text=documentgetElementById('text').value;

function validate(){

var database=firebase.database().ref();

database.child("text").set(text);

}

Text:

Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐