top of page

DOM Tree JAVA

1. DOM Tree division

a. It has another div inside that div there's another div and inside that div, there's an l inside that URL there are some list of digital marketing companies in hyderabad allies that are kind of traversing down this Dom tree. So that's DOM traversal. Now that's straight on a conceptual level but what does that mean for us as JavaScript developers. 

b. Well, what it means is the dorm will open up the interface for us to be able to manipulate elements inside of it. In other words, if we want to access this particular document we can do that via Damini appellation. So I did want to note list of digital marketing companies in hyderabad also the dorm is not a programming language.

2. Accessing the Dorm
 
a. So we don't have to learn any kind of new language here we just use javascript. But what it does do is it provides basically a model of a web page. So put one other way. The page content is stored in the dorm and can be accessed and manipulated. In best digital marketing company javascript, in terms of understanding the dorm I like this quote from the Mozilla Developer Network describing it and it's put it in quotation here.

b. The dorm provides a representation of the document as a structured group of notes and objects that have properties and methods and what that means. Basically, everything in this document can be split up into something called the node and there's a bunch of built-in methods we can call to manipulate the dorm as well. Now It doesn't take anything special it doesn't do any magic or anything it's very simple. And let me just make some list of digital marketing companies in hyderabad space here. And what we can do is we can just call the global variable document and then we can call document Daut some method built into it or some node we want to access.

3.built-in functions

so basically we can immediately begin accessing the document if we need to and you know what let's just cancel logo that document let's just see what it looks like in the console. Let's open up the console get rid of the smell over here so we can make some list of digital marketing companies in hyderabad space and we'll run this code. We'll see that it gives us this object in view of all the objects at this point. Right, so objects they have a bunch of key-value pairs. We can have built-in functions and you can see that there's a whole lot of stuff inside this document including a bunch of our H.M.S. stuff that we just described. And so this is our commented out javascript This is our team specific stuff you see we have a whole bunch of methods we can call here.

In fact, there's a lot of them these are kind of event listeners which we will be exploring later. And this is basically the API you know you can think of this as an API that we can use. And by the way, I should mention how you can use javascript on any given HVM. So here Jay has been doing it for us. I look at my age you know list of digital marketing companies in hyderabad it's doing it for us. But basically, you can do it a couple of different ways you can put it inside script tags.

Examples

 

So if we put say after we close off the body but before we close off the H.M. tag you can throw in a script tag in here and then you can just write any javascript you need to. So let's clear this. And if you want to see that in action we do Konsole that log I'm in a style tag and if we run this let's see if it catches it OK it looks like it did. And it's also still going by the old code. Try that again. So we just put it inside a style tag. So that's one way to check list of digital marketing companies in hyderabad and load a script. Japan does this for us in the background. So we don't really need to worry about it the other way would be to do something like strip's source equals and then use it from a file relative to where you are currently.

So for example in your files slash my J.S. Daut J.S., for example, that's how you can load one. But we don't even need to worry about that when we're using Jaspan Jaspan just kind of puts style tags in or script tags in for us.

bottom of page