Pages

Sunday, January 16, 2011

JavaScript and the DOM

The Document Object Model (the DOM) is like the architectural frame of the "buildings" (or web pages) we create with HTML.  And JavaScript is the tool we use to crawl up and down the DOM.  Why would you want to do that?  Well, for various reasons you may want to identify an individual part of the framework of the web page.  For instance, you may want to find the particular paragraph that holds the link for another website. JavaScript is essentially a "language" that helps us identify, describe, and even change, parts of the page, by relating each part of the page to all other parts, via the DOM. In fact, JavaScript even allows you to re-frame your building. It allows you to change the link unobtrusively, without the web visitor being disrupted by your change-of-scenery (to switch metaphors).  Anyway, enough intro.  Let's look at a good video, by the JavaScript Teacher, who shows us how to navigate the DOM of a web page using JavaScript.

No comments:

Post a Comment