A web resource visit is a specific URI in the address bar of a browser. The visitor indicates the address of the page, and it is parsed by the browser into the elements of the DOM tree - Document Object Model. Any link on this page tells the browser to parse another page and build a different tree of objects.
The browser allows the visitor to go back or go forward along the chain of pages that have already been viewed in the current session.
In fact, user actions are moving between systems of objects formed in the process of visiting pages. Each page is its own DOM tree and, in addition, JavaScript object's are syntax objects of the language itself and user descriptions.
DOM: Download, Update and Change
, -, DOM JavaScript, , , :
- - ;
- - ( Ctrl-F5);
- , (AJAX, , , ...).
, . - «» , .
, . , .
(, AJAX) - . , , , .
JavaScript
JavaScript . - . , .
, "", "", true, false, null undefined, . , DOM JavaScript Object's. .
, Math. , - .
DOM . JavaScript object function's - .
,
JavaScript : "" = "" . object JavaScript - "" = "". "" , .
. , , ( . . ) .
, , , . , - .
:
JavaScript object - , - , , .
, .
Object.keys: JavaScript . , , .
. , . .
:
- x1_Obj.NameLast;
- x1_Obj['NameFirst'].
. "{}" "," ( ). , .
- , JavaScript delete object ( - ) .
:
- delete x1_Obj.NameLast;
- delete x2_Obj['NameFirst'];
, - . false, .
JavaScript object properties functions () . , .
- - JavaScript.
x3_Obj, : item pos. hello() . , JavaScript object values , , (1) .
Hello() () (2) .
this
this .
. . :
- var oCookie = new scCookies(cOwnerCode);
- oCookie.Init();
cOwnerCode - . , oCookie . , , this :
- this.GetCookie = function(cName) { ... };
- this.SetCookie = function(cName, cValue) { ... }.
.
- this.GetCookie('cOwner');
- this.SetCookie('cOwner', cOwner);
, , .
, JavaScript Object's - , . , , . DOM , - JavaScript.
- . - . - . : = , - .
. ( ), .
, DOM JavaScript : () .
- , (). , .
.
DOM JavaScript: object event's - . .
JavaScript «» , , , .
Object event - , . , .
, - , - , AJAX .
, , , .
"" URI, -, , DOM - -. .
-, . , :
, , . JavaScript, , .
Objects are finished components that can be formatted as separate files and used in the future. A characteristic feature of this approach is the possibility of feedback when an updated, improved object can be used in a previous development, automatically updating its functionality without updating the site.