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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
320
Design Voice-First Games for Alexa
ryan403
0
87
AI Teaching Talk
ryan403
0
150
Cognitive Service
ryan403
0
120
jQuery & API Practices
ryan403
0
150
CSS Practices
ryan403
1
180
JavaScript Practices
ryan403
0
110
Web Programming - Lesson 6
ryan403
1
660
Web Programming - Lesson 7
ryan403
1
660
Other Decks in Programming
See All in Programming
Spec-Driven Development with AI-Agents: From High-Level Requirements to Working Software
antonarhipov
2
470
気づいたらRubyで100作品 ー クリエイティブコーディングが生活の一部になるまで / 100 Ruby Sketches Later: How Creative Coding Became Part of My Life
chobishiba
3
550
脅威をエンジニアリングの糧にして――現場編 / Turning Threats into Engineering Fuel — Field Edition
nrslib
0
260
キャリア迷子上等 ─ "ない道"は自分で作ればいい
16bitidol
3
1.8k
並列実装の現場、2ヶ月間実務でAIを使い倒したAIもPCも私も限界が近い
ming_ayami
0
110
CLIであることを活かしたGitHub Copilot CLI活用術 / GitHub Copilot CLI Pro Tips & Tricks
nao_mk2
1
1.2k
決定論的オーケストレーションの設計と実装 / Design and Implementation of Deterministic Orchestration
nrslib
3
1.2k
ローカルLLMを使ってB2Bサービスを作っていての学び
yaotti
0
150
New "Type" system on PicoRuby
pocke
1
670
Oxlintのカスタムルールの現況
syumai
6
1k
不変条件と整合性境界—ビジネスが決める設計判断と実現パターン / Invariants and Consistency Boundaries
nrslib
13
3.5k
AIチームを指揮するOSS「TAKT」活用術 / How to Use “TAKT,” an OSS Tool for Orchestrating AI Teams
nrslib
6
840
Featured
See All Featured
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Abbi's Birthday
coloredviolet
2
8k
Design in an AI World
tapps
1
230
Skip the Path - Find Your Career Trail
mkilby
1
140
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
200
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
430
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
380
Joys of Absence: A Defence of Solitary Play
codingconduct
1
390
Code Reviewing Like a Champion
maltzj
528
40k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.1k
Mind Mapping
helmedeiros
PRO
1
240
The Pragmatic Product Professional
lauravandoore
37
7.3k
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