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 :
- Locate the node that represents the element you want to work with
- 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 :
- parentNode
- previousSibling nextSibling
- firstChild lastChild
CROSS-SITE SCRIPTING (XSS) ATTACKS
the site creating by many different people ,so it Exhibition to be underattack