SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Zealot
    Join Date
    Jun 2005
    Posts
    102
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    DOM and Javascript

    Morning All

    I posted yesterday asking which book people recommend that I study so as to learn Javascript.

    Can I just ask a quick question to get a key concept in my head. What is the difference and relationship between the DOM and Javascript?

    If I learnt the DOM, would I be able to say that I've learnt Javascript, or just a small section of it?

    The reason that I ask is that my colleague has just given me the book Dom Scripting my Jeremy Keith.

    Thanks All

    Daniel

  2. #2
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    DOM, the Document Object Model, is the browser's internal representation of an HTML or XML document. It's a hierarchical structure of node objects. For instance, each HTML element is represented by an Element node, and text content is represented by Text nodes.

    JavaScript is basically the ECMAScript programming language plus a few default objects for interacting with the web browser.
    Birnam wood is come to Dunsinane

  3. #3
    SitePoint Zealot
    Join Date
    Jun 2005
    Posts
    102
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks mate

    From what you say, I'd need to get a Javascript book to learn Javascript, the DOM book wouldn't be enough?

    Thanks

    Daniel

  4. #4
    SitePoint Wizard Pepejeria's Avatar
    Join Date
    Jan 2005
    Location
    Too far up north
    Posts
    1,566
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    "JavaScript Bible" also covers the DOM. I guess most JavaScript books do.

  5. #5
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The DOM as such is agnostic about language. It's just a representation of a tagged document.

    But if you're going to do DOM manipulations in a web application, you need to know both JavaScript and the DOM. I would recommend learning JavaScript first, since that will allow you to think about the DOM in JavaScript terms as you go on to learn about the DOM.
    Birnam wood is come to Dunsinane

  6. #6
    SitePoint Zealot
    Join Date
    Jun 2005
    Posts
    102
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the replies all over the last couple of days, this has been really helpful.

    Thanks again

    Daniel


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •