View on GitHub

reading-notes

This is my read notes

WHAT IS AN OBJECT?

make a model from variables(properties) and functions(METHODS). the name and value called key

ways to create an objects:

Litral Notation Accessing an object and dot notation var Name = objectName.Prooerty;or finction var Name = objectName[Prooerty;or finction]

Document Object Model

it is mean specifies how browsers should create a model of an HTML and javascript DOM TREE ; show all object with methods and properties.

WORKING WITH THE DOM TREE

Accessing and updating :

  1. Locate the node that represents the element you want to work with
  2. Locate the node that represents the element you want to work with

Caching DOM queries:

if we use the elements more than one we store it in var. (caching)

Accessing Elements

by Groups (collection);-by class or tag - or Fastest route (we can use it by id)

TRAVERSING THE DOM by :

  1. parentNode
  2. previousSibling nextSibling
  3. firstChild lastChild

CROSS-SITE SCRIPTING (XSS) ATTACKS

the site creating by many different people ,so it Exhibition to be underattack

dom object