SlideShare a Scribd company logo
undefinedin.net
2015/5/28 wrote by ironiqu
undefined in
本日、勉強したいのは
DOMについてです
軽く解説し、演習します
今日のアジェンダ
1. 前回の復習
2. DOMとはなんですか
3. DOMの操作方法
4. 皆さんにとってのDOMの有用性
5. DOMってみる
6. 皆さんにお願い
90分ほどおつきあいください
前回の復習
前回について何か覚えてる方!
前回の復習
勉強会についての説明
JavaScriptについて軽く解説をしました
前回の復習
しかし、座学ばかりでは理解は進まない
より深く理解するためには?
前回の復習
実際に動くものを作った方が
楽しいし、理解しやすいはず!
前回の復習
もっともな理由は
体で覚えて実務で
シナプスがつながりやすくなること
DOMとはなんですか
DOMの言葉の意味は
前回のスライドを確認してね!
DOMとはなんですか
前回は言葉の意味
今回は使い道について解説
DOMとはなんですか
HTMLを作った団体が作った仕組み
DOMとはなんですか
HTMLと他のシステムがおててをつなぐ
そんなステキなシステム
(実装はベンダーによる)
DOMとはなんですか
おててをつなぐ
仲良くなるために言葉を理解しよう
DOMの操作方法
TagName : HTMLタグのタグ名
ID : HTMLタグのid
ClassName : HTMLタグのclass
Style : HTMLタグの見た目(css)
Attribute : 属性(href, src...)
DOMの操作方法
Element : HTMLタグそのもの(単なるタグ)
Node : HTMLタグなど…(節々)
Child : こども
Parent : おや
DOMの操作方法
最低限、これらの言葉さえ知っておけば
DOMの操作に困ることはありません
DOMの操作方法
とは、言っても
理解するには実行あるのみ
http://www.w3schools.com/jsref/dom_obj_all.asp
DOMの操作方法
実行文をみた通り、組み合わせです
childNodes, lastChild, children,
parentNode, cloneNode, getAttribute
DOMの操作方法
これで、少しはDOMとおててつなぎやすく
なったのではないでしょうか
皆さんにとってのDOMの有用性
先の実行で
それぞれのElementを
参照できることが分かりました
皆さんにとってのDOMの有用性
参照が出来ることで
皆さんはElementを操作することが出来ます
おめでとうございます
皆さんにとってのDOMの有用性
例えば
途中でElementの値を変更
Elementの見た目を変える
Elementに付加価値つける
皆さんにとってのDOMの有用性
Element.innerText = “文字”;
Element.style.background = “#ff0000”;
皆さんにとってのDOMの有用性
では、これらの操作が出来ることによって
どのようなことに有効活用できるでしょうか?
皆さんにとってのDOMの有用性
送信ボタンを連打出来ないようにしたい
皆さんにとってのDOMの有用性
リンクの説明を表示させたい
皆さんにとってのDOMの有用性
動きを付けて注目させたい
皆さんにとってのDOMの有用性
他に有効活用できる場面は?
DOMってみる
では、実際に操作してみたいと思います
DOMってみる
必要なのは
FirefoxかChrome!
ファイル : DOM_demo.html
DOMってみる
WindowsはF12キー
MacintoshはOpt+Cmd+Iキー
で開発ツールを起動する
DOMってみる
送信ボタンの連打を禁止する
ファイル : DOM_click_once.html
DOMってみる
文字の表示を切り替える
ファイル : DOM_change_text.html
DOMってみる
A地点からB地点へElementの移動する
ファイル : DOM_move_box.html
DOMってみる
覚えるよりなれましょう
すべては定型文です
DOMってみる
なれてしまえば、ドラマを見ながら
こんな操作の実装も出来ます
ファイル : DOM_ROTATE_BOX.html
皆さんにお願い
この勉強会:”undefined in”は
参加者全員で作っていく会です
you / i
皆さんにお願い
これから出来ることが増えていきます
片手間でいいので
何かを作って発表してほしいです
皆さんにお願い
本当に些細なもので構いません
意味なく仕組みを使っただけなど
例えば…
ファイル : JT
皆さんにお願い
何をしてみたかった
何に注力して作った
など、を解説してもらえればと思います
undefined in DOM
参加いただきありがとうございました

More Related Content

Recently uploaded

2024年5月25日Serverless Meetup大阪 アプリケーションをどこで動かすべきなのか.pptx
2024年5月25日Serverless Meetup大阪 アプリケーションをどこで動かすべきなのか.pptx2024年5月25日Serverless Meetup大阪 アプリケーションをどこで動かすべきなのか.pptx
2024年5月25日Serverless Meetup大阪 アプリケーションをどこで動かすべきなのか.pptx
ssuserbefd24
 

Recently uploaded (11)

20240523_IoTLT_vol111_kitazaki_v1___.pdf
20240523_IoTLT_vol111_kitazaki_v1___.pdf20240523_IoTLT_vol111_kitazaki_v1___.pdf
20240523_IoTLT_vol111_kitazaki_v1___.pdf
 
ロボットマニピュレーションの作業・動作計画 / rosjp_planning_for_robotic_manipulation_20240521
ロボットマニピュレーションの作業・動作計画 / rosjp_planning_for_robotic_manipulation_20240521ロボットマニピュレーションの作業・動作計画 / rosjp_planning_for_robotic_manipulation_20240521
ロボットマニピュレーションの作業・動作計画 / rosjp_planning_for_robotic_manipulation_20240521
 
論文紹介:ViTPose: Simple Vision Transformer Baselines for Human Pose Estimation
論文紹介:ViTPose: Simple Vision Transformer Baselines for Human Pose Estimation論文紹介:ViTPose: Simple Vision Transformer Baselines for Human Pose Estimation
論文紹介:ViTPose: Simple Vision Transformer Baselines for Human Pose Estimation
 
論文紹介: Offline Q-Learning on diverse Multi-Task data both scales and generalizes
論文紹介: Offline Q-Learning on diverse Multi-Task data both scales and generalizes論文紹介: Offline Q-Learning on diverse Multi-Task data both scales and generalizes
論文紹介: Offline Q-Learning on diverse Multi-Task data both scales and generalizes
 
5/22 第23回 Customer系エンジニア座談会のスライド 公開用 西口瑛一
5/22 第23回 Customer系エンジニア座談会のスライド 公開用 西口瑛一5/22 第23回 Customer系エンジニア座談会のスライド 公開用 西口瑛一
5/22 第23回 Customer系エンジニア座談会のスライド 公開用 西口瑛一
 
2024年5月25日Serverless Meetup大阪 アプリケーションをどこで動かすべきなのか.pptx
2024年5月25日Serverless Meetup大阪 アプリケーションをどこで動かすべきなのか.pptx2024年5月25日Serverless Meetup大阪 アプリケーションをどこで動かすべきなのか.pptx
2024年5月25日Serverless Meetup大阪 アプリケーションをどこで動かすべきなのか.pptx
 
2024年度_サイバーエージェント_新卒研修「データベースの歴史」.pptx
2024年度_サイバーエージェント_新卒研修「データベースの歴史」.pptx2024年度_サイバーエージェント_新卒研修「データベースの歴史」.pptx
2024年度_サイバーエージェント_新卒研修「データベースの歴史」.pptx
 
論文紹介:Deep Occlusion-Aware Instance Segmentation With Overlapping BiLayers
論文紹介:Deep Occlusion-Aware Instance Segmentation With Overlapping BiLayers論文紹介:Deep Occlusion-Aware Instance Segmentation With Overlapping BiLayers
論文紹介:Deep Occlusion-Aware Instance Segmentation With Overlapping BiLayers
 
論文紹介: Exploiting semantic segmentation to boost reinforcement learning in vid...
論文紹介: Exploiting semantic segmentation to boost reinforcement learning in vid...論文紹介: Exploiting semantic segmentation to boost reinforcement learning in vid...
論文紹介: Exploiting semantic segmentation to boost reinforcement learning in vid...
 
Amazon Cognitoで実装するパスキー (Security-JAWS【第33回】 勉強会)
Amazon Cognitoで実装するパスキー (Security-JAWS【第33回】 勉強会)Amazon Cognitoで実装するパスキー (Security-JAWS【第33回】 勉強会)
Amazon Cognitoで実装するパスキー (Security-JAWS【第33回】 勉強会)
 
Intranet Development v1.0 (TSG LIVE! 12 LT )
Intranet Development v1.0 (TSG LIVE! 12 LT )Intranet Development v1.0 (TSG LIVE! 12 LT )
Intranet Development v1.0 (TSG LIVE! 12 LT )
 

Featured

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

undefined in dom