Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Web Programming - Lesson 3
Search
Ryan Chung
March 22, 2020
Programming
0
590
Web Programming - Lesson 3
Ryan Chung
March 22, 2020
Tweet
Share
More Decks by Ryan Chung
See All by Ryan Chung
MovieBot Development
ryan403
0
300
Design Voice-First Games for Alexa
ryan403
0
54
AI Teaching Talk
ryan403
0
110
Cognitive Service
ryan403
0
96
jQuery & API Practices
ryan403
0
130
CSS Practices
ryan403
1
150
JavaScript Practices
ryan403
0
98
Web Programming - Lesson 6
ryan403
1
610
Web Programming - Lesson 7
ryan403
1
620
Other Decks in Programming
See All in Programming
ご注文の差分はこちらですか? 〜 AWS CDK のいろいろな差分検出と安全なデプロイ
konokenj
3
380
MCPを使ってイベントソーシングのAIコーディングを効率化する / Streamlining Event Sourcing AI Coding with MCP
tomohisa
0
150
Deep Dive into ~/.claude/projects
hiragram
14
8.4k
Advanced Micro Frontends: Multi Version/ Framework Scenarios @WAD 2025, Berlin
manfredsteyer
PRO
0
340
はじめてのWeb API体験 ー 飲食店検索アプリを作ろうー
akinko_0915
0
110
技術同人誌をMCP Serverにしてみた
74th
1
680
イベントストーミング図からコードへの変換手順 / Procedure for Converting Event Storming Diagrams to Code
nrslib
2
940
なぜ適用するか、移行して理解するClean Architecture 〜構造を超えて設計を継承する〜 / Why Apply, Migrate and Understand Clean Architecture - Inherit Design Beyond Structure
seike460
PRO
3
780
GPUを計算資源として使おう!
primenumber
1
190
LT 2025-06-30: プロダクトエンジニアの役割
yamamotok
0
810
“いい感じ“な定量評価を求めて - Four Keysとアウトカムの間の探求 -
nealle
2
11k
ニーリーにおけるプロダクトエンジニア
nealle
0
890
Featured
See All Featured
Agile that works and the tools we love
rasmusluckow
329
21k
Optimising Largest Contentful Paint
csswizardry
37
3.3k
Measuring & Analyzing Core Web Vitals
bluesmoon
7
510
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3.3k
It's Worth the Effort
3n
185
28k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
A Modern Web Designer's Workflow
chriscoyier
695
190k
Writing Fast Ruby
sferik
628
62k
Side Projects
sachag
455
42k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
BBQ
matthewcrist
89
9.7k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
34
5.9k
Transcript
Web Programming –
[email protected]
行動開發學院 行動開發學院 JavaScript Lab 心理測驗-你的愛情是什麼滋味? Ryan
Chung 58
Web Programming –
[email protected]
行動開發學院 行動開發學院 需求 • 想要將網路上的心理測驗文字轉換成互動模式 •
使用者只要逐題作答就可以得到結果 59
Web Programming –
[email protected]
行動開發學院 行動開發學院 預期成果 • 每頁顯示一題目,使用者選擇後按下按鈕 •
最後會出現結果,並可重新開始作答 • 按鈕會依情境改變:開始、下一題、重新開始 60
Web Programming –
[email protected]
行動開發學院 行動開發學院 檔案 • index.html:主要顯示頁面 •
main.js:主要程式運作 • style.css:網頁樣式檔 • data.js:存放資料 61
Web Programming –
[email protected]
行動開發學院 行動開發學院 index.html 畫面 • 匯入
data.js、main.js • 建立標題、問題與選項區塊、選項區塊、按鈕 62
Web Programming –
[email protected]
行動開發學院 行動開發學院 data.js • 直接下載使用 63
https://github.com/ryan403/love-taste-quiz/
Web Programming –
[email protected]
行動開發學院 行動開發學院 觀察data.js • 了解 {
}、[ ] 的用法 • Dictionary { } –Key-value Pair • Array [ ] –有順序性 64
Web Programming –
[email protected]
行動開發學院 行動開發學院 style.css 畫面呈現優化 65
Web Programming –
[email protected]
行動開發學院 行動開發學院 main.js • 建立變數、建立按鈕事件處理 66
Web Programming –
[email protected]
行動開發學院 行動開發學院 main.js • 兵分兩路,開始作答或繼續作答 •
想想一開始作答跟其他題的作答有什麼不一樣? • 畫面上只有一顆按鈕 67
Web Programming –
[email protected]
行動開發學院 行動開發學院 main.js 第一題的顯示 68
Web Programming –
[email protected]
行動開發學院 行動開發學院 main.js - else •
檢查哪一個選項被使用者選取 69
Web Programming –
[email protected]
行動開發學院 行動開發學院 main.js - else •
是要往下一題顯示還是通往結果 70
Web Programming –
[email protected]
行動開發學院 行動開發學院 main.js – 通往最終結果 •
顯示結果標題、結果詳細內容 71
Web Programming –
[email protected]
行動開發學院 行動開發學院 main.js – 顯示下一題 •
注意題號 72
Web Programming –
[email protected]
行動開發學院 行動開發學院 總算完成! 73
Web Programming –
[email protected]
行動開發學院 行動開發學院 Recap • HTML –div、h2、radio、label、button、checked
• JavaScript –if...else –==、null • jQuery –:radio、empty()、attr()、each() –return false • 資料檔案 –陣列、字典、第x個、多層存取 74
Web Programming –
[email protected]
行動開發學院 行動開發學院 Lab – 累積分數型的測驗 •
PDP性格測驗 75 https://bookmarks.tw/pdp/