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
第07回Network講座2019
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
北海道科学大学 電子計算機研究部
July 16, 2019
Education
53
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
第07回Network講座2019
北海道科学大学 電子計算機研究部
July 16, 2019
More Decks by 北海道科学大学 電子計算機研究部
See All by 北海道科学大学 電子計算機研究部
第12回Network講座2019
densan
1
65
第11回Network講座2019
densan
0
75
第10回Network講座2019
densan
0
52
第09回Network講座2019
densan
1
170
第08回Network講座2019
densan
0
57
第06回Network講座2019
densan
0
76
第05回Network講座2019
densan
0
55
第04回Network講座2019
densan
0
120
第03回Network講座2019
densan
0
45
Other Decks in Education
See All in Education
Implicit and Cross-Device Interaction - Lecture 10 - Next Generation User Interfaces (4018166FNR)
signer
PRO
2
2.3k
[2026前期火5] 論理学(京都大学文学部 前期 第8回)「正規化定理の証明」
yatabe
0
150
Case Studies and Future Research - Lecture 12 - Next Generation User Interfaces (4018166FNR)
signer
PRO
0
170
「機械学習と因果推論」入門 ② 回帰分析から因果分析へ
masakat0
0
700
Data Processing and Visualisation Frameworks - Lecture 6 - Information Visualisation (4019538FNR)
signer
PRO
1
3.1k
Human-AI Interaction - Lecture 11 - Next Generation User Interfaces (4018166FNR)
signer
PRO
0
1.1k
Protecting Patrons with Digital Vendors
dsalo
0
200
2026年度春学期 統計学 第3回 クロス集計と感度・特異度,データの可視化 (2026. 4. 23)
akiraasano
PRO
0
150
BITCOIN : Les fondamentaux !
rlifchitz
0
170
Lectura 1 (PIT : Python Basico)
robintux
0
360
Examen de Selectividad. Geografía junio 2026 (Convocatoria Ordinaria). UCLM
juanmartin2026
0
140
Case Studies - Lecture 12 - Information Visualisation (4019538FNR)
signer
PRO
0
140
Featured
See All Featured
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
730
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
Git: the NoSQL Database
bkeepers
PRO
432
67k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
11k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.2k
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
590
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
200
YesSQL, Process and Tooling at Scale
rocio
174
15k
Build your cross-platform service in a week with App Engine
jlugia
234
18k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
220
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
210
Transcript
ネットワークチーム 第7回 2019 北海道科学大学 電子計算機研究部
INDEX ⚫ オブジェクト ⚫ DOM ⚫ HTMLの操作 ⚫ 関数・メソッドの呼び出し 2
オブジェクト
オブジェクトとは JavaScriptのオブジェクトとは 名前(キー)と値のペア の集まり このペアをプロパティという 4 user1 name : ”Gouda”
age : 19 num : 2173056 user2 name : ”Kanda” age : 19 num : 2173068
オブジェクトの生成 JavaScriptでは オブジェクトを変数に入れることができる。 5 let name = { key1:value1, key2:value2
}; 構文 let name = new Object(); name.key1 = value1; name.key2 = value2;
オブジェクトへのアクセス オブジェクトの要素へアクセスするためには . (ピリオド)又は [“ ”] を使用する。 6 name.key1 =
value; 構文 name key1 : *** key2 : *** name key1 : value key2 : *** name[“key1”] = value;
書いてみよう 7
メソッド オブジェクトは関数を持つことができる。 このとき、オブジェクトの中の関数を メソッドという 8 let name = { method:function()
{ 処理; } }; 構文
書いてみよう 9
DOM
DOMとは Document Object Model HTMLの要素を、JavaScriptなどのプログラムから 操作するための仕組み HTML文書をツリー状の集合として扱う これをDOMツリーという DOMツリーでは HTMLの各タグや要素をノードと呼ぶ
11
DOMツリー 12 <html> <body> <h1> <p> 見出し netteam <head> <title>
DOMツリー Document ノード
HTMLの操作 getElementsBy
getElementsBy – メソッド document(HTMLファイル)から 指定した条件を満たす要素を取得するメソッド 14 構文 用途 .getElementsByClassName(クラス名); 指定したクラスの要素を
配列で取得 .getElementsByName(name属性値); 指定したname属性値を持つ 要素を配列で取得 .getElementsByTagName(要素名); 指定したタグの要素を 配列で取得 .getElementById(ID名); 指定したID名を持つ要素を 取得(配列ではない)
書いてみよう 15
要素へのアクセス 取得した要素にアクセスするには 以下の方法がある 16 構文 用途 .innerHTML 要素にアクセス タグを含む .innerText
要素にアクセス タグを含まない .textContent .innerTextとほぼ同じ
書いてみよう 17 P16の続きから 文字が書き換えられた!
書いてみよう 18 添字を忘れずに
書いてみよう 19
要素の追加1 20
要素の追加2 21
関数・メソッドの呼び出し
ボタンによる呼び出し ボタンに関数を設定することで ボタンが押下されたときに関数を呼び出すことができる 23
書いてみよう 24
本日はここまで お疲れ様でした