or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Syncing
xxxxxxxxxx
如何在網頁中引入 Firebase 當中的資料
首先,你必須有一個準備要引入 database 的網頁:
在桌面上新增一個資料夾叫做 test
在 test 資料夾中新增這個檔案叫做 ClassA.html。
有了網頁後,以下是引入資料的步驟
點選 Project Overview

點選紅筆圈起來的東西,這個是新增一個 web app 的意思

幫你的 web app 取一個名字!
紅色圈圈裡面的東西不要勾喔! 那是我們暫時用不到的功能
接下來這一步是關鍵!
把裡面的程式碼複製下來,然後放進 ClassA.html 裡面的
</body>
標籤下面。記得,中間 Config 裡面的東西是密碼!不可以輕易給別人取得,所以我這邊給你們看是錯誤的示範!因為別人只要有這一段程式碼就可以入侵你的 database。
接下來,請在 ClassA.html 裡面的這行下面
加入底下這行 script
基本上,到這邊就可以使用官方提供的 API, function來操作你的 database 摟!
例如:
在 html 最底下(
</html>上面
)輸入然後點開你的 ClassA.html,就可以在 chrome developer tool 中看到你 database 裡的東西摟!