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 1
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Ryan Chung
March 07, 2020
Programming
960
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Web Programming - Lesson 1
Ryan Chung
March 07, 2020
More Decks by Ryan Chung
See All by Ryan Chung
MovieBot Development
ryan403
0
330
Design Voice-First Games for Alexa
ryan403
0
88
AI Teaching Talk
ryan403
0
150
Cognitive Service
ryan403
0
120
jQuery & API Practices
ryan403
0
160
CSS Practices
ryan403
1
180
JavaScript Practices
ryan403
0
110
Web Programming - Lesson 6
ryan403
1
670
Web Programming - Lesson 7
ryan403
1
660
Other Decks in Programming
See All in Programming
AI 輔助遺留系統現代化的經驗分享
jame2408
1
1.1k
エンジニアと一緒にテストコードの設計と実装を改善した話
mototakatsu
0
230
TypeScript+Orvalで実現する型安全かつ堅牢でスケーラブルなマルチチャネル通知基盤 / TSKaigi Night talks ~after conference~
d0riven
0
380
トークンをケチるな、設計しろ:GitHub Copilotを賢く使うコンテキスト戦略
ochtum
0
270
そのテスト、説明できますか?~LWテスト戦略FW~のご紹介
nakahara
0
180
AI時代のUIはどこへ行く?その2!
yusukebe
22
7.7k
Signal Forms: Details & Live Coding @enterJS 2026 in Mannheim
manfredsteyer
PRO
0
210
PHPで使える日時の表現と、その知り方 #frontend_phpcon_do
o0h
PRO
0
280
キャリア迷子上等 ─ "ない道"は自分で作ればいい
16bitidol
3
2.6k
スマートグラスで並列バイブコーディング
hyshu
0
270
作って学ぶ、 JSX (TSX) ランタイムの基本
syumai
7
1.7k
jQueryをバージョンアップする前に使いたいjQuery Migrate
matsuo_atsushi
0
620
Featured
See All Featured
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
760
Side Projects
sachag
455
43k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
Color Theory Basics | Prateek | Gurzu
gurzu
0
380
How to Ace a Technical Interview
jacobian
281
24k
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.4k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.5k
Practical Orchestrator
shlominoach
191
11k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
280
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
630
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
410
Transcript
Web Programming –
[email protected]
行動開發學院 行動開發學院 JavaScript Lab Ryan Chung
1
Web Programming –
[email protected]
行動開發學院 行動開發學院 Lab Index • Hello
JavaScript! – 環境安裝、套件安裝、專案基本構成 • 今天晚上吃什麼 – 亂數選擇器 – HTML/CSS/JS、jQuery、亂數 • 自動排課系統 – 表格、陣列、日期時間、函數、迴圈、字串、樣式 • 心理測驗 – 你的愛情是什麼滋味? – 條件判斷、按鈕、資料取得、陣列、字典 • RPG極簡雛形製作 – Canvas、圖型載入、For..in、事件、Switch • Youtube心情點唱機 – Youtube iFrame API、div、id、物件 • 網頁整合 – Bootstrap、超連結、選單、jQuery選擇器 • 網站上線 – GitHub Pages、Git 2
Web Programming –
[email protected]
行動開發學院 行動開發學院 開發環境 https://code.visualstudio.com/ 3
Web Programming –
[email protected]
行動開發學院 行動開發學院 安裝擴充套件 • 按下左邊 Extensions圖示
或 Ctrl + Shift + X –Chinese (Traditional) Language Pack for Visual Studio –HTML Boilerplate –Live Server 4
Web Programming –
[email protected]
行動開發學院 行動開發學院 第一個 JS專案 • 在電腦中新增一個資料夾:HelloJavaScript
• 打開VS Code, 檔案(F) -> 開啟資料夾… • 選擇剛才建立的資料夾 • 關閉「開始使用」分頁 5
Web Programming –
[email protected]
行動開發學院 行動開發學院 第一個 JS專案 • 在左邊區塊點擊右鍵,新增檔案,命名為index.html
• 在右邊輸入htm,然後選html5-boilerplate 6
Web Programming –
[email protected]
行動開發學院 行動開發學院 第一個 JS專案 • 在左邊點擊右鍵,新增檔案,再增加兩個檔案
– main.js – style.css 7
Web Programming –
[email protected]
行動開發學院 行動開發學院 第一個 JS專案 • 回到index.html,編輯檔案如下
8
Web Programming –
[email protected]
行動開發學院 行動開發學院 第一個 JS專案 • 再到main.js,編輯檔案如下
9
Web Programming –
[email protected]
行動開發學院 行動開發學院 測試執行 • 按下右下方的Go Live
10
Web Programming –
[email protected]
行動開發學院 行動開發學院 JavaScript Lab 今天晚上吃什麼 –
亂數選擇器 11
Web Programming –
[email protected]
行動開發學院 行動開發學院 預期畫面 12
Web Programming –
[email protected]
行動開發學院 行動開發學院 功能 • 點擊按鈕後,從下列選項中任意挑選一個並 顯示
• 按下按鈕後的動作 • 取得清單中的文字 • 任意選擇一個項目 13
Web Programming –
[email protected]
行動開發學院 行動開發學院 畫面的拆解 • 標題 •
置中 • 按鈕 • 置中 • 選項清單 • 靠左 14
Web Programming –
[email protected]
行動開發學院 行動開發學院 基本畫面元素 • 如何產生標題? •
如何決定標題上的文字? • 如何產生按鈕? • 如何決定按鈕上的文字? • 如何產生清單? • 如何撰寫清單上的項目? 15
Web Programming –
[email protected]
行動開發學院 行動開發學院 畫面編排 • 如何讓標題與按鈕置中? •
如何讓選單靠左? 16
Web Programming –
[email protected]
行動開發學院 行動開發學院 功能拆解 • 如何讓按鈕按下之後有所動作? •
如何取得清單中的文字? • 如何任意挑選其中一個項目? • 如何改變標題的文字? 17
Web Programming –
[email protected]
行動開發學院 行動開發學院 建立專案 • 複製上一個例子的資料夾,重新命名:RandomSelector •
打開VS Code, 檔案(F) -> 開啟資料夾 Open Folder... • 選擇RandomSelector資料夾 18
Web Programming –
[email protected]
行動開發學院 行動開發學院 先放置畫面內容 19
Web Programming –
[email protected]
行動開發學院 行動開發學院 修改 main.js 20
Web Programming –
[email protected]
行動開發學院 行動開發學院 結果不正 21
Web Programming –
[email protected]
行動開發學院 行動開發學院 修改 style.css 22
Web Programming –
[email protected]
行動開發學院 行動開發學院 選項跑到中間,但是符號還在旁邊 23
Web Programming –
[email protected]
行動開發學院 行動開發學院 再修正 style.css 24
Web Programming –
[email protected]
行動開發學院 行動開發學院 index.html 匯入 jQuery 25
Web Programming –
[email protected]
行動開發學院 行動開發學院 main.js 按鈕按了有反應 26
Web Programming –
[email protected]
行動開發學院 行動開發學院 main.js 按鈕按了可以改變那個問號 27
Web Programming –
[email protected]
行動開發學院 行動開發學院 main.js 按鈕按了可以拿到任一筆資料 28
Web Programming –
[email protected]
行動開發學院 行動開發學院 main.js • 先計算li元件有幾個 •
產生對應的亂數範圍 • 使用這個亂數 29
Web Programming –
[email protected]
行動開發學院 行動開發學院 Recap • 開發/測試環境 •
HTML / CSS / JavaScript • jQuery • 亂數 30
Web Programming –
[email protected]
行動開發學院 行動開發學院 延伸 Lab • 在下方加上圖片,當選到特定項目時,下方也
能出現對應的圖片 31