This is my favourite kind of quiz. You build a beautiful quiz page with AI, your students fill it in, and their class, name, answers, and score drop straight into a Google Sheet — automatically. The same trick makes a wonderful survey, too. And it's faster and far better-looking than Google Forms.
這是我最喜歡的一種小考。你用 AI 做出一頁漂亮的測驗,學生填完後,他們的班級、姓名、作答與分數會自動掉進一份 Google Sheet 裡。同樣的方法拿來做問卷調查也超好用。而且它比 Google Forms 更快、更好看。
It looks like magic, but it's just four simple steps passing data along a line. Once you see the shape, the rest is easy.看起來像魔法,其實只是四個簡單步驟,把資料一棒接一棒傳下去。看懂這個形狀,後面就簡單了。
Here's where the time-saving begins. Instead of typing questions into a form one at a time, you describe the whole quiz once and AI writes all of it — every question, the scoring, and the design — in a single page.省時間就從這裡開始。你不用一題一題打進表單,而是把整份測驗描述一次,AI 就把全部寫出來——每一題、自動算分、還有設計——全在一頁。
Copy-and-paste prompt可直接複製的提示詞
Make a single self-contained HTML quiz page about [your topic]
for [grade / level] students.
- [10] multiple-choice questions, ALL on one page (not one at a time).
- At the top: a "Name" field and a "Class" field.
- A Submit button that scores the answers in the browser and
shows the student their score.
- On submit, also send the result to this web address using fetch (POST):
[paste your Apps Script /exec URL from Part C]
Send it as JSON: { class, name, score, answers }
- Friendly, colourful design, big text, works on phones.
No login, no outside libraries.
Now we build the other end of the line — the Sheet, and the little script that writes a new row each time a student submits.現在來做這條線的另一端——Sheet,以及那段每次學生送出就寫一列的小腳本。
Time, Class, Name, Score, Answers.前往 sheets.new。在第 1 列打上欄位標題——例如:Time、Class、Name、Score、Answers。
Paste this into Apps Script把這段貼進 Apps Script
function doPost(e) {
var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheets()[0];
var data = JSON.parse(e.postData.contents);
sheet.appendRow([
new Date(),
data.class,
data.name,
data.score,
(data.answers || []).join(" | ")
]);
return ContentService.createTextOutput("ok");
}
/exec. This is the address from Part B.Google 第一次會請你授權自己的腳本——這很正常。接著它會給你一個以 /exec 結尾的網址。這就是 Part B 要用的那個網址。
Two ends, one link. Now you hand the /exec URL to the quiz page, publish it, and watch the first row appear.兩端、一條線。現在把 /exec 網址交給測驗頁、發佈出去,看著第一列出現。
/exec URL back to AI: "here's my Apps Script URL, put it in the page." Or paste it yourself where the page says fetch(.把 /exec 網址交回給 AI:「這是我的 Apps Script 網址,請放進頁面。」或自己貼到頁面裡寫著 fetch( 的地方。
index.html to your GitHub repository, exactly like Lesson 1. Within a minute it's live and shareable.把 index.html 上傳到你的 GitHub repository,就跟第一課一樣。約一分鐘就上線、可以分享。
What the page is doing (you don't have to write this)頁面在做的事(你不用自己寫)
fetch("https://script.google.com/macros/s/AKfy…/exec", {
method: "POST",
body: JSON.stringify({ class: cls, name: name, score: score, answers: answers })
});
Google Forms is fine — and for a single quick question, it's the right call. But the moment you want something beautiful, branded, or long, the difference is huge. Both, by the way, can save to a Google Sheet.Google Forms 很好——而且只要一個快速問題,它就是對的選擇。但當你想要漂亮、有品牌感、或題目很多時,差別就很大了。順帶一提,兩者都能存進 Google Sheet。
| Your own quiz page你自己的測驗網頁 | Google Forms | |
|---|---|---|
| Look & feel外觀質感 | Anything you want — your colours, your school, real design.你想要的任何樣子——你的顏色、你的學校、真正的設計。 | One plain template. Tidy, but the same as everyone else's.一個樸素的模板。整齊,但跟大家長得一樣。 |
| All questions at once所有題目一次看 | Yes — one page, scroll through, like a real paper test.可以——一頁到底,像真正的紙本考卷。 | Possible, but built and edited one question at a time.做得到,但要一題一題建立和修改。 |
| Building 20 questions出 20 題的速度 | AI writes all 20 in one go. Minutes.AI 一口氣寫完 20 題。幾分鐘。 | Type, click "add", repeat ×20. Lots of copy-paste.打字、按「新增」、重複 20 次。一堆複製貼上。 |
| Auto-scoring自動算分 | Yes — and you control exactly how feedback looks.可以——而且你能完全掌控回饋怎麼呈現。 | Yes (Quiz mode), within Forms' fixed style.可以(測驗模式),但限定在 Forms 的固定樣式裡。 |
| Where answers go作答存到哪 | Your Google Sheet — class, name, score, answers.你的 Google Sheet——班級、姓名、分數、作答。 | A Google Sheet too. Same destination.也是 Google Sheet。同一個目的地。 |
| Lives inside your site能放進你的網站 | Yes — it's just a page on your own website.可以——它本來就是你網站上的一頁。 | Only as an embedded box; the design never quite matches.只能嵌成一個方框;設計永遠搭不太起來。 |
| Quickest one-off question臨時一個小問題 | Slight setup (the script, once).要一點設定(那段腳本,做一次)。 | Fastest — nothing to set up. Forms wins here.最快——完全免設定。這裡 Forms 勝。 |
Check the deployment access is Anyone, and that the page has your /exec URL (not the editor URL).
確認部署的存取權是任何人,而且頁面用的是你的 /exec 網址(不是編輯器的網址)。
Yes — each submit just adds another row. You'll see every attempt, with its time.
可以——每次送出就多一列。你會看到每一次作答和它的時間。
Only you can open the Sheet. Keep it to names and answers — never collect anything sensitive. See Responsible AI.
只有你能打開那份 Sheet。只收姓名和作答就好——絕不收集敏感資料。參見負責任 AI。