With the object model, JavaScript gets all the power it needs to create dynamic HTML.
JavaScript Tutorial
JavaScript Tutorial
JavaScript Asynchronous
JavaScript HTML DOM
Advertisement
Google AdSense Slot (LEADERBOARD)
Automated High-CTR Ad Rail • Set Publisher ID in config/adsense.php
DOM Tree
7 min read
•
Chapter 20 of 22
JS DOM Intro
When a web page is loaded, the browser creates a Document Object Model of the page. The HTML DOM model is constructed as a tree of Objects.
Example
<!DOCTYPE html>
<html>
<body style="font-family:sans-serif;padding:20px;">
<h3 id="introHead">Target this Header</h3>
<button onclick="document.getElementById('introHead').style.color='#04aa6d'">Turn Green</button>
</body>
</html>
Try it Yourself >>
Opens live sandboxed code editor
Advertisement
Google AdSense Slot (IN-ARTICLE)
Automated High-CTR Ad Rail • Set Publisher ID in config/adsense.php
Community Q&A & Discussion
Verified
No questions yet. Be the first to start the discussion!