| 
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • You already know Dokkio is an AI-powered assistant to organize & manage your digital files & messages. Very soon, Dokkio will support Outlook as well as One Drive. Check it out today!

View
 

Lecture - The Document Object Model

This version was saved 11 years, 7 months ago View current version     Page history
Saved by Dr. Ron Eaglin
on August 27, 2012 at 12:23:47 pm
 

 

The Document Object Model

 

Prerequisites

 

Lecture - Getting Started in HTML  and Lecture - Getting Started with CSS

 

Summary

 

This covers the basics of the document object model for html pages. It uses Javascript to show the structure of a web page, and demonstrates how this can be used.

 

Video 

 

 

 

Reference Materials


<!DOCTYPE html>
<html>
  <head>
    <title>Hello HTML</title>
    <link rel="stylesheet" type="text/css" href="/styles.css">
<script>
  function reducePicture()
 {
   var height = document.getElementById("picture").height;
   var width = document.getElementById("picture").width;
   document.getElementById("picture").height = height / 2;
   document.getElementById("picture").width = width / 2;
 }
</script>
  </head>
  <body>
    <p class="mystyle">Hello World!</p>
    <a href="https://cop4813eaglin.pbworks.com/w/page/57579829/Lecture%20-%20Getting%20Started
%20in%20HTML">Link to Web Site</a><br/>
    <button onclick="reducePicture()">Reduce Size</button><br/>
    <img id="picture" src="Eaglin.jpg"><br/>
  </body>
</html> 

 

 

 

 

Additional Information

 

Full information about the DOM is available at the W3C - http://www.w3.org/DOM/ 

You can learn more about the DOM at W3Schools and do tutorials - http://www.w3schools.com/dom/default.asp 

 

 

COP 4813 Lectures

Comments (0)

You don't have permission to comment on this page.