Object Literals in javascript .

An object literal is an Object and an object . You can define the type for an object literal with type or interface . It is a quick way to have data in a structure that is typed. The object literal inherits from Object .Objects group together a set of variables and functions to create a model of a something you would recognize from the real world. In an object , variables and functions take on new names. object

An object is a series of variables and functions that represent something from the world around you. In an object, variables are known as properties of the object; functions are known as methods of the object.

Document Object Model

The Document Object Model (DOM) specifies how browsers should create a model of an HTML page and how JavaScript can access and update the contents of a web page while it is in the browser window. DOM

THE DOCUMENT NODE

Above, you can see the HTML code for a shopping list, and on the right hand page is its DOM tree. Every element, attribute, and piece of text in the HTML is represented by its own DOM node. At the top of the tree a document node is added.

ELEMENT NODES

access the DOM tree, you start by looking for elements. Once you find the element you want, then you can access its text and attribute nodes if you want to. This is why you start by learning methods that allow you to access element nodes, before learning to access and alter text or attributes. . elemant

WORKING WITH THE DOM TREE

  1. ACCESS THE ELEMENTS

    The terms elements and element nodes are used interchangeably but when people say the DOM is working with an element, it is actually working with a node that represents that element. and you can selected INDIVIDUAL ELEMENT NODE by id or MULTIPLE ELEMENTS by class .

WORK WITH THOSE ELEMENTS

The text inside any element is stored inside a textnode. To access the text node above:

  1. Select the element
  2. Use the fi rstChi l d property to get the text node
  3. Use the text node’s only property (nodeVa l ue) to get the text from the element

The following is a brief list of common APIs in web and XML page scripting using the DOM.

  • document.querySelector(selector)
  • document.querySelectorAll(name)
  • document.createElement(name)
  • parentNode.appendChild(node)
  • element.innerHTML
  • element.style.left
  • element.setAttribute()
  • element.getAttribute()
  • element.addEventListener()
  • window.content
  • GlobalEventHandlers/onload
  • window.scrollTo()

A Web page is a document. This document can be either displayed in the browser window or as the HTML source. But it is the same document in both cases. The Document Object Model (DOM) represents that same document so it can be manipulated. The DOM is an object-oriented representation of the web page, which can be modified with a scripting language such as JavaScript. so by following the preives tage we can make change . dom

  1. Browsers offer tools for viewing the DOM tree
  2. An element node can contain multiple text nodes and child elements that are siblings of each other.
  3. Whenever a DOM query can return more than one node, it will always return a Nadel i st. From an element node, you can access and update its content using properties such as textContent and i nnerHTML or using DOM manipulation techniques
  4. You can select element nodes by their id or cl ass attributes, by tag name, or using CSS selector syntax DOM trees have four types of nodes: document nodes, element nodes, attribute nodes, and text nodes .

problem domian

A problem domain is simply looking at only the topics of an individual’s interest, and excluding everything else. For example, when developing a system to measure good practice in medicine, carpet drawings at hospitals would not be included in the problem domain. domain

It is a process that the programmer performs to investigate all the delays and shortcuts that the program contains, and then examines and tests them in whether they work or not, and it is a difficult process that needs a lot of time and effort

quiz :

  1. Document Object Model …….
  2. what is the problem domain ?
  3. mention toe of acsess in DOM …..

w3school

problem domain

for more info please visit my github qusaiqeisi

best regard