13. What is DOM?

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

In what ways can a page be represented? two ways

1. source code 2. browser view

What can become an object in programming?

An object is just a thing, some thing, any thing that makes sense to treat as an individual piece, even if it contains other things.

What is document object?

As we know a thing can be made of a lot pieces or components. every single component of that thing can be regarded as an object. even the whole thing itself is an object like a car or a document. but not only components can be objects but the whole thing is an object as well.

What does DOM stand for?

DOM is document object and model.

What is an object for us the codes of a web page? FONTOS

For us, it really means the elements, the components, the individual pieces of this document.

What do objects represent in DOME?

For us, it really means the elements, the components, the individual pieces of this document.

What can we do with the diagram of DOME?

It represents the tree structure of a HTML page we can use that info to navigate and manipulate a HTML page

Miért fontos ez a hasonlat?

Mert a HTML oldal is olyan mint egy hálozat amely alkotóelemekből áll azaz nodokból áll.

So what is the MODEL actually?

So the model is simply a set of terms that we can agree on, a set of standards that we can use. So what we end up with is an agreed-upon set of terms that describe exactly how to interact with the pieces of a web page. It's an agreed-upon terminology that will let us describe and interact with any web page.

Mik az alkotó elemei a HTML oldalnak?

a tagok amiket nodoknak is hívhatunk funkciójuk alapján.

what is the object in a class.

a tanuló az egy object.mert az egy componense az osztálynak Péter pedig egy instance péter pedig egy példánya annak az objectnek..

Does JS scrip bring the webpage or the webpage bring JS?

a webpage brings JS.

What is a node?

alkotóeleme egy hálózatnak.

Why is it OBJECT model?

because the different parts of a document are objects in JS.

What is difference between instance and object?

class, table, student, school, teacher are objects. they are the components of school. but they are different components from each other. peter, tom, jack, ann they are object instances because (they are different pieces or members of the same component ) they are a példánya instance of an object. they are instances of the same object. instance is a példány vagy drab valamilyen fajból. so the class room is an object. the table is also. the black board is also. peter's table is an instance?

Miért volt fontos a DOME létrehozása?

ha nem volna DOME és bármelyik oldal elemet bármilyen névvel lehetne illetni a hálozatban előfordulhatna hogy egy bizonyos web elemet több különböző néven illetnénk és az értelmező nem értené. Hibaüzeneteket küldene. a DOME meghatározza egyes elemek pontos nevét ezért ilyen hibák nem következhetnek be.

What elements that is to say objects are we talking about?

headline h1 tag unordered list the whole document is an element as well.

What kind of document does the document object model refer to?

in our case the word document refers to an HTML document which is an object itself and the model is the map it is the way how it looks how it is constructed.

Does JS run in a vacuum on its own?

it doesn't run in a vacuum. Our scripts will be attached to a web page, and it's the web page that comes first. They bring our script with them, not the other way around.

What is MODEL?

it is a diagram. Now, what they mean here is model as in a business model or data model. You've seen flowcharts or database diagrams, a model makes it easier for us to understand the structure of sg. model: 3 a simplified description, especially a mathematical one, of a system or process, to assist calculations and predictions: a statistical model used for predicting the survival rates of endangered species. 2 a thing used as an example to follow or imitate: the project became a model for other schemes.

What is a document?

it is a simple page. not the site, the web page; the web page is the document.

Where is JS attached to?

it is attached to a web page.

What is the page we want to paint on like?

it is like a canvas. it is the environment we are affecting. it is the world we live in.

What can we do with JS when we want to affect a page?

we are able to reach from a JavaScript into these pages and cause these pages to reach back into our script.

How can we reach from JavaScript into these pages?

we do it by understanding the Document Object Model.

as result of that how do we run JS?

we run the web page by typing the path to the webpage in the browser and interpreter will find java script code and interpret it.

What can we call the elements in other words?

We can call them nodes.

What is the DOM?

they are set of rules according to which you can access a document, create a document and manipulate it.

What is the DOM?

they are set of rules according to which you can access a document, create a document and manipulate it. The Document Object Model (DOM) is an application programming interface (API) for valid HTML and well-formed XML documents. It defines the logical structure of documents and the way a document is accessed and manipulated. In the DOM specification, the term "document" is used in the broad sense - increasingly, XML is being used as a way of representing many different kinds of information that may be stored in diverse systems, and much of this would traditionally be seen as data rather than as documents. Nevertheless, XML presents this data as documents, and the DOM may be used to manage this data.

What will I be able to do if i know the DOM well?

I can say I want to get the text of the title I want to get the second paragraph element. I want to get the third link in the menu and change how it's displaying or change the background color of all paragraphs, get all the list item elements, find an image and start to move it, change a link from its default behavior to actually performing a JavaScript function, even creating new unordered lists, creating paragraphs, creating menus inserting them into the page on the fly, a lot more besides

What is model in general?

model is a map. it is the visual representation of sg. it shows the construction of a thing.

How many object instances can document object have?

only one. a user defined object can have as many instances as we want but document object is predefined object which always to refer to one document and therefore it does not have more than one instance. it is unlike when we crate an student object and each student is an instance.

Milyen fajta kapcsolatokat állíthatunk fel a nodok között.

szülő gyerek kapcsolatokat.


Kaugnay na mga set ng pag-aaral

Unit 3 Fundamentals Documenting, Reporting, ....

View Set

Chapter 12 Musculoskeletal Medications

View Set

Orion Series 65 Quick Quiz 18, 19, and 20

View Set

Regulation 4 Partnership Interest 1 of 4

View Set

Physics Review Chapters 27 and 28 Unit Test Wednesday May 6, 2015

View Set

LESSON 4: COLOR VISION DEFICIENCY

View Set

Factors Causing Environmental Problems Unit 1

View Set