Search the Community
Showing results for tags 'dom'.
Hi, I started reading the chapter about Document Object Model, and I have a few beginner questions: 1. Quote from book: Isn't HTML element the root node? 2. Quote from book: But on http://www.w3schools.com/jsref/prop_node_nodetype.asp and https://developer.mozilla.org/en-US/docs/Web/API/Node.nodeType this is different: Also, what is the difference between "1 for an HTML element" and "10 for the HTML element"? I guess that's a mistake. Thank you in advance!
Hi all, I have just completed chapter 8 of the book and came across something I don't quite understand. In chapter 8 page 293 we make a new function call setHandlers and have an array of events in string format named events. In step 6, the code loops through the array and calls the following code: var checkbox = U.$(events); If I'm not wrong the U.$ is a function in a global object that returns the element for the passed in Id (the code in my U.$ function after checking for type string is return document.getElementById(id)). Now later in step 7 the code checks if the checkbox is ch