SlideShare ist ein Scribd-Unternehmen logo
1 von 24
By: Daniel Bragais
   DHTML simply means dynamic
    HTML.



Dynamic = changes each time it is
  viewed, constantly changing. Like a
  flowing river. 
   It is not a language, in the
    sense HTML is a
    Language that creates
    Web pages or that
    JavaScript create codes
    that add interactivity to
    HTML documents.
   Instead, DHTML is a collection
    of technologies that supports
    HTML and extends the
    interactive capabilities of
    browsers.
   Remember that HTML is a Static
    and is mainly a language for
    Structuring and presenting Web
    page content. Web pages only
    acquire interactivity when
    JavaScript codes are introduced,
    for example
•    Some of the most
    commonly used
    technologies include

   JavaScript
    CSS
   Document Object Model(DOM)
   XHTML.
   Therefore, DHTML does the
    following:

   Works with JavaScript
   Works with Data Object Model
    (DOM)
   Works with CSS
   Combines HTML with JavaScript
Document Object Model
       Provides a
way to TREAT individual
       elements in

      HTML
       as objects.
   You can also think of DOM as a map
    of your HTML document, with each
    element acting as a marker. Once that
    marker is set into place, it becomes
    easy for JavaScript to work on this
    marker, communicate with it, and get
    feedback from it.
HTML DOM Tree
   Since HTML provides structures for
    element in your Webpage. DOM also
    recognizes the structure of an HTML
    document. As HTML elements may
    be placed within other elements,
    DOM reads the HTML structure as a
    map. It sees the map as composed of
    sections, and within each section are
    subsections and their elements.
How to Set Up a Document Object
Consider each element in your HTML as
  an Object. DOM reads each HTML
  element as a unique object and as a
  node within your structure. However,
  to set an element as a document you
  must give it its unique identity by
  using ID attribute. This can be done
  This Ways:
   IDs are mainly used in HTML for
    layout purposes and to identify the
    unique elements in your HTML code.
    Because it is a unique identifier, each
    ID can be used only once in the page
    in defining specific elements.

                 id
    Specifies a unique id for the element.
    Naming rules: Must contain at least
    one character

    Must not contain any space characters

    In HTML, all values are case-
    insensitive
Syntax

<element   id="id">
   Definition and Usage
   The getElementById() method
    accesses the first element with the
    specified id.



   Syntax
   document.getElementById("id")
   javascript document.getelementbyid
   If you want to quickly access the
    value of an HTML input give it
    an id to make your life a lot easier.
    This small script below will check to
    see if there is any text in the text field
    "myText". The argument
    that getElementById requires is
    the id of the HTML element you wish
    to utilize.
   JavaScript Code:

   <script type="text/javascript"> function
    notEmpty(){ var myTextField =
    document.getElementById('myText');
    if(myTextField.value != "") alert("You
    entered: " + myTextField.value) else
    alert("Would you please enter some text?") }
    </script> <input type='text' id='myText' />
    <input type='button' onclick='notEmpty()'
    value='Form Checker' />
   document.getElementById returned a
    reference to our HTML
    element myText. We stored this
    reference into a variable, myTextField,
    and then used the valueproperty that
    all input elements have to use to grab
    the value the user enters.
   There are other ways to accomplish
    what the above script does, but this is
    definitely a straight-forward and
    browser-compatible approach.
Thank
         you!!!
       dan_brgs87@yahoo.com

www.codecademy.com/groups/danlike
 dojo/invite/7e343de793e7752aabb734
             dc624eb319

Weitere ähnliche Inhalte

Was ist angesagt?

jQuery Tutorial For Beginners | Developing User Interface (UI) Using jQuery |...
jQuery Tutorial For Beginners | Developing User Interface (UI) Using jQuery |...jQuery Tutorial For Beginners | Developing User Interface (UI) Using jQuery |...
jQuery Tutorial For Beginners | Developing User Interface (UI) Using jQuery |...Edureka!
 
An Introduction to the DOM
An Introduction to the DOMAn Introduction to the DOM
An Introduction to the DOMMindy McAdams
 
Document Object Model
Document Object ModelDocument Object Model
Document Object Modelchomas kandar
 
Event In JavaScript
Event In JavaScriptEvent In JavaScript
Event In JavaScriptShahDhruv21
 
JavaScript - Chapter 11 - Events
 JavaScript - Chapter 11 - Events  JavaScript - Chapter 11 - Events
JavaScript - Chapter 11 - Events WebStackAcademy
 
JavaScript - Chapter 9 - TypeConversion and Regular Expressions
 JavaScript - Chapter 9 - TypeConversion and Regular Expressions  JavaScript - Chapter 9 - TypeConversion and Regular Expressions
JavaScript - Chapter 9 - TypeConversion and Regular Expressions WebStackAcademy
 
Javascript dom event
Javascript dom eventJavascript dom event
Javascript dom eventBunlong Van
 
Introduction to JavaScript
Introduction to JavaScriptIntroduction to JavaScript
Introduction to JavaScriptAndres Baravalle
 
XML Schema
XML SchemaXML Schema
XML Schemayht4ever
 
Document object model(dom)
Document object model(dom)Document object model(dom)
Document object model(dom)rahul kundu
 
Python SQite3 database Tutorial | SQlite Database
Python SQite3 database Tutorial | SQlite DatabasePython SQite3 database Tutorial | SQlite Database
Python SQite3 database Tutorial | SQlite DatabaseElangovanTechNotesET
 

Was ist angesagt? (20)

jQuery Tutorial For Beginners | Developing User Interface (UI) Using jQuery |...
jQuery Tutorial For Beginners | Developing User Interface (UI) Using jQuery |...jQuery Tutorial For Beginners | Developing User Interface (UI) Using jQuery |...
jQuery Tutorial For Beginners | Developing User Interface (UI) Using jQuery |...
 
Dom
Dom Dom
Dom
 
An Introduction to the DOM
An Introduction to the DOMAn Introduction to the DOM
An Introduction to the DOM
 
Document Object Model
Document Object ModelDocument Object Model
Document Object Model
 
Event In JavaScript
Event In JavaScriptEvent In JavaScript
Event In JavaScript
 
JavaScript - Chapter 11 - Events
 JavaScript - Chapter 11 - Events  JavaScript - Chapter 11 - Events
JavaScript - Chapter 11 - Events
 
Introduction to the DOM
Introduction to the DOMIntroduction to the DOM
Introduction to the DOM
 
JavaScript - Chapter 9 - TypeConversion and Regular Expressions
 JavaScript - Chapter 9 - TypeConversion and Regular Expressions  JavaScript - Chapter 9 - TypeConversion and Regular Expressions
JavaScript - Chapter 9 - TypeConversion and Regular Expressions
 
jQuery for beginners
jQuery for beginnersjQuery for beginners
jQuery for beginners
 
PHP - Introduction to File Handling with PHP
PHP -  Introduction to  File Handling with PHPPHP -  Introduction to  File Handling with PHP
PHP - Introduction to File Handling with PHP
 
Xml schema
Xml schemaXml schema
Xml schema
 
Javascript dom event
Javascript dom eventJavascript dom event
Javascript dom event
 
Basics of JavaScript
Basics of JavaScriptBasics of JavaScript
Basics of JavaScript
 
Introduction to JavaScript
Introduction to JavaScriptIntroduction to JavaScript
Introduction to JavaScript
 
XML Schema
XML SchemaXML Schema
XML Schema
 
Javascript
JavascriptJavascript
Javascript
 
JQuery introduction
JQuery introductionJQuery introduction
JQuery introduction
 
Document object model(dom)
Document object model(dom)Document object model(dom)
Document object model(dom)
 
Js ppt
Js pptJs ppt
Js ppt
 
Python SQite3 database Tutorial | SQlite Database
Python SQite3 database Tutorial | SQlite DatabasePython SQite3 database Tutorial | SQlite Database
Python SQite3 database Tutorial | SQlite Database
 

Andere mochten auch

Andere mochten auch (9)

Html.ppt
Html.pptHtml.ppt
Html.ppt
 
Html Ppt
Html PptHtml Ppt
Html Ppt
 
Dhtml
DhtmlDhtml
Dhtml
 
DOM ( Document Object Model )
DOM ( Document Object Model )DOM ( Document Object Model )
DOM ( Document Object Model )
 
Introduction to Html5
Introduction to Html5Introduction to Html5
Introduction to Html5
 
Introduction to html
Introduction to htmlIntroduction to html
Introduction to html
 
html5.ppt
html5.ppthtml5.ppt
html5.ppt
 
Html Ppt
Html PptHtml Ppt
Html Ppt
 
Introduction to HTML
Introduction to HTMLIntroduction to HTML
Introduction to HTML
 

Ähnlich wie Introduction to DOM

Ähnlich wie Introduction to DOM (20)

Digital Marketing Company
Digital Marketing CompanyDigital Marketing Company
Digital Marketing Company
 
Bootcamp - Web Development Session 2
Bootcamp - Web Development Session 2Bootcamp - Web Development Session 2
Bootcamp - Web Development Session 2
 
Html & Html5 from scratch
Html & Html5 from scratchHtml & Html5 from scratch
Html & Html5 from scratch
 
Understanding the dom by Benedict Ayiko
Understanding the dom by Benedict AyikoUnderstanding the dom by Benedict Ayiko
Understanding the dom by Benedict Ayiko
 
Html tutorials-infotech aus
Html tutorials-infotech ausHtml tutorials-infotech aus
Html tutorials-infotech aus
 
Presentation
PresentationPresentation
Presentation
 
Web Design & Development - Session 2
Web Design & Development - Session 2Web Design & Development - Session 2
Web Design & Development - Session 2
 
Introduction to Web Development.pptx
Introduction to Web Development.pptxIntroduction to Web Development.pptx
Introduction to Web Development.pptx
 
Introduction to Web Development.pptx
Introduction to Web Development.pptxIntroduction to Web Development.pptx
Introduction to Web Development.pptx
 
Introduction to Web Development.pptx
Introduction to Web Development.pptxIntroduction to Web Development.pptx
Introduction to Web Development.pptx
 
Dom
DomDom
Dom
 
Computer fundamentals-internet p2
Computer fundamentals-internet p2Computer fundamentals-internet p2
Computer fundamentals-internet p2
 
Html Guide
Html GuideHtml Guide
Html Guide
 
Html
HtmlHtml
Html
 
19ESKIT058_5thSem.pptx
19ESKIT058_5thSem.pptx19ESKIT058_5thSem.pptx
19ESKIT058_5thSem.pptx
 
Introduction to Html5, css, Javascript and Jquery
Introduction to Html5, css, Javascript and JqueryIntroduction to Html5, css, Javascript and Jquery
Introduction to Html5, css, Javascript and Jquery
 
Html5 tutorial
Html5 tutorialHtml5 tutorial
Html5 tutorial
 
Html5 - Tutorial
Html5 - TutorialHtml5 - Tutorial
Html5 - Tutorial
 
CreatingWebPages-Part1.ppt
CreatingWebPages-Part1.pptCreatingWebPages-Part1.ppt
CreatingWebPages-Part1.ppt
 
Html
HtmlHtml
Html
 

Mehr von Daniel Bragais

Mock Calls for call center practice
Mock Calls for call center practiceMock Calls for call center practice
Mock Calls for call center practiceDaniel Bragais
 
Reviewer Let professional education 13
Reviewer Let professional education 13Reviewer Let professional education 13
Reviewer Let professional education 13Daniel Bragais
 
Reviewer LET professional education 12
Reviewer LET professional education 12Reviewer LET professional education 12
Reviewer LET professional education 12Daniel Bragais
 
Program for investiture 2016 tagalog version
Program for investiture 2016 tagalog versionProgram for investiture 2016 tagalog version
Program for investiture 2016 tagalog versionDaniel Bragais
 
English Examination Philippines
English Examination PhilippinesEnglish Examination Philippines
English Examination PhilippinesDaniel Bragais
 
Program for investiture tagalog version Script and Spiel
Program for investiture tagalog version Script and SpielProgram for investiture tagalog version Script and Spiel
Program for investiture tagalog version Script and SpielDaniel Bragais
 
Multiple intelligence - Howard Gardner
Multiple intelligence - Howard GardnerMultiple intelligence - Howard Gardner
Multiple intelligence - Howard GardnerDaniel Bragais
 
English 7 monthly test
English 7  monthly testEnglish 7  monthly test
English 7 monthly testDaniel Bragais
 
Benefits of marijuana cannabis to chemotherapy (thesis)
Benefits of marijuana cannabis to chemotherapy (thesis)Benefits of marijuana cannabis to chemotherapy (thesis)
Benefits of marijuana cannabis to chemotherapy (thesis)Daniel Bragais
 
Republic act 9262 anti vawc act
Republic act 9262 anti vawc actRepublic act 9262 anti vawc act
Republic act 9262 anti vawc actDaniel Bragais
 
Casa Boy Scout of the Philippines investiture 2014
Casa Boy Scout of the Philippines investiture 2014Casa Boy Scout of the Philippines investiture 2014
Casa Boy Scout of the Philippines investiture 2014Daniel Bragais
 
Modules Linear Algebra Drills
Modules Linear Algebra DrillsModules Linear Algebra Drills
Modules Linear Algebra DrillsDaniel Bragais
 
What is good governance
What is good governanceWhat is good governance
What is good governanceDaniel Bragais
 
New teachers orientation
New teachers orientationNew teachers orientation
New teachers orientationDaniel Bragais
 
Strategic intervention materials (1) edited
Strategic intervention materials (1) editedStrategic intervention materials (1) edited
Strategic intervention materials (1) editedDaniel Bragais
 
Report in educational leadership
Report in educational leadershipReport in educational leadership
Report in educational leadershipDaniel Bragais
 

Mehr von Daniel Bragais (20)

Deped certificate
Deped certificateDeped certificate
Deped certificate
 
Mock Calls for call center practice
Mock Calls for call center practiceMock Calls for call center practice
Mock Calls for call center practice
 
Reviewer Let professional education 13
Reviewer Let professional education 13Reviewer Let professional education 13
Reviewer Let professional education 13
 
Reviewer LET professional education 12
Reviewer LET professional education 12Reviewer LET professional education 12
Reviewer LET professional education 12
 
Program for investiture 2016 tagalog version
Program for investiture 2016 tagalog versionProgram for investiture 2016 tagalog version
Program for investiture 2016 tagalog version
 
English Examination Philippines
English Examination PhilippinesEnglish Examination Philippines
English Examination Philippines
 
Program for investiture tagalog version Script and Spiel
Program for investiture tagalog version Script and SpielProgram for investiture tagalog version Script and Spiel
Program for investiture tagalog version Script and Spiel
 
Multiple intelligence - Howard Gardner
Multiple intelligence - Howard GardnerMultiple intelligence - Howard Gardner
Multiple intelligence - Howard Gardner
 
English 7 monthly test
English 7  monthly testEnglish 7  monthly test
English 7 monthly test
 
Benefits of marijuana cannabis to chemotherapy (thesis)
Benefits of marijuana cannabis to chemotherapy (thesis)Benefits of marijuana cannabis to chemotherapy (thesis)
Benefits of marijuana cannabis to chemotherapy (thesis)
 
Search warrant
Search warrantSearch warrant
Search warrant
 
Republic act 9262 anti vawc act
Republic act 9262 anti vawc actRepublic act 9262 anti vawc act
Republic act 9262 anti vawc act
 
Casa Boy Scout of the Philippines investiture 2014
Casa Boy Scout of the Philippines investiture 2014Casa Boy Scout of the Philippines investiture 2014
Casa Boy Scout of the Philippines investiture 2014
 
Modules Linear Algebra Drills
Modules Linear Algebra DrillsModules Linear Algebra Drills
Modules Linear Algebra Drills
 
What is good governance
What is good governanceWhat is good governance
What is good governance
 
Deped K12
Deped K12Deped K12
Deped K12
 
New teachers orientation
New teachers orientationNew teachers orientation
New teachers orientation
 
Ra no.7722
Ra no.7722Ra no.7722
Ra no.7722
 
Strategic intervention materials (1) edited
Strategic intervention materials (1) editedStrategic intervention materials (1) edited
Strategic intervention materials (1) edited
 
Report in educational leadership
Report in educational leadershipReport in educational leadership
Report in educational leadership
 

Kürzlich hochgeladen

Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 

Kürzlich hochgeladen (20)

Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 

Introduction to DOM

  • 2. DHTML simply means dynamic HTML. Dynamic = changes each time it is viewed, constantly changing. Like a flowing river. 
  • 3. It is not a language, in the sense HTML is a Language that creates Web pages or that JavaScript create codes that add interactivity to HTML documents.
  • 4. Instead, DHTML is a collection of technologies that supports HTML and extends the interactive capabilities of browsers.
  • 5. Remember that HTML is a Static and is mainly a language for Structuring and presenting Web page content. Web pages only acquire interactivity when JavaScript codes are introduced, for example
  • 6. Some of the most commonly used technologies include  JavaScript  CSS  Document Object Model(DOM)  XHTML.
  • 7. Therefore, DHTML does the following:  Works with JavaScript  Works with Data Object Model (DOM)  Works with CSS  Combines HTML with JavaScript
  • 8. Document Object Model Provides a way to TREAT individual elements in HTML as objects.
  • 9. You can also think of DOM as a map of your HTML document, with each element acting as a marker. Once that marker is set into place, it becomes easy for JavaScript to work on this marker, communicate with it, and get feedback from it.
  • 11. Since HTML provides structures for element in your Webpage. DOM also recognizes the structure of an HTML document. As HTML elements may be placed within other elements, DOM reads the HTML structure as a map. It sees the map as composed of sections, and within each section are subsections and their elements.
  • 12. How to Set Up a Document Object
  • 13. Consider each element in your HTML as an Object. DOM reads each HTML element as a unique object and as a node within your structure. However, to set an element as a document you must give it its unique identity by using ID attribute. This can be done This Ways:
  • 14. IDs are mainly used in HTML for layout purposes and to identify the unique elements in your HTML code. Because it is a unique identifier, each ID can be used only once in the page in defining specific elements.
  • 15. id Specifies a unique id for the element. Naming rules: Must contain at least one character  Must not contain any space characters  In HTML, all values are case- insensitive
  • 17. Definition and Usage  The getElementById() method accesses the first element with the specified id.  Syntax  document.getElementById("id")
  • 18. javascript document.getelementbyid  If you want to quickly access the value of an HTML input give it an id to make your life a lot easier. This small script below will check to see if there is any text in the text field "myText". The argument that getElementById requires is the id of the HTML element you wish to utilize.
  • 19. JavaScript Code:  <script type="text/javascript"> function notEmpty(){ var myTextField = document.getElementById('myText'); if(myTextField.value != "") alert("You entered: " + myTextField.value) else alert("Would you please enter some text?") } </script> <input type='text' id='myText' /> <input type='button' onclick='notEmpty()' value='Form Checker' />
  • 20.
  • 21.
  • 22.
  • 23. document.getElementById returned a reference to our HTML element myText. We stored this reference into a variable, myTextField, and then used the valueproperty that all input elements have to use to grab the value the user enters.  There are other ways to accomplish what the above script does, but this is definitely a straight-forward and browser-compatible approach.
  • 24. Thank you!!! dan_brgs87@yahoo.com www.codecademy.com/groups/danlike dojo/invite/7e343de793e7752aabb734 dc624eb319